<style>
    .body_border tr td{border:1px solid #e7eaec}
    thead tr td{background:#F9FaFC}
    .conent0{line-height: 30px;}
    .allmap{width:100%;height:150px;display:none;}
    .business_table tbody tr td{border:none;padding:2px;}
    /*活动*/
    .ai-yellow{
        background-color: rgba(254,215,32,.7);
    }
    .ai-blue{
        background-color: rgba(43,161,225,.7);
    }
    .ai-green{
        background-color: rgba(121,196,85,.7);
    }
    .ai-red{
        background-color:rgba(230,88,69,.7);
    }
    .ai-orange{
        background-color:rgba(244,131,61,.7);
    }
    .ai-purple{
        background-color:rgba(166,58,150,.7);
    }
    .ai-dark-blue{
        background-color: rgba(58,153,166,.7);
    }
    #vertical-timeline::before{
        width:0px !important;
    }

    .addMember-remove{
        position: relative;
        margin-right:-10px;
        top: -13px;
        right: 13px;
        display:none;
        font-size: 10px;
        line-height: 1;
        color: #fa7a7a;
        cursor: pointer;
        background-color: #fff;
        border-radius: 50%;
    }
    .form_bottm{
        margin-bottom: 15px;
    }
    .nav > li > a{
        color: inherit;
        font-weight: inherit;
    }
    .houxuanren .nav.nav-tabs li {
        background: none;
        border: none;
        margin-top: 20px;
    }
    #right-sidebar-log{
        width: 40% !important;
        box-shadow: -2px -1px 10px #ccc;
    }
    .icosgj{
        position: relative;
        cursor: pointer;
    }
    .beizhus{
        display: none;
        position: absolute;
        background: #e7e8f2;
        color: #575757;
        border: 1px solid #767676;
        padding: 0px 10px;
        height: 30px;
        min-width: 120px;
        text-align: center;
        line-height: 30px;
        border-radius: 4px;
        top: 14px;
        left: -45px;
    }
    .icosgj:hover .beizhus{
        display: block;

    }
    .label_n{
        margin-right: 5px;
    }
    #picker{
        display: inline-block;
        position: relative;
        top: 16px;
        margin-top: -19px;
    }
</style>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/webuploader/webuploader.css">

<!--引入JS-->
<script type="text/javascript" src="__PUBLIC__/webuploader/webuploader.js"></script>
<ul class="nav nav-tabs" id="left_list">
    <li class="active">
        <a href="#tab0" data-toggle="tab" type="tab0">
            <!--<label class="label_n customer_num">8</label>-->
            候选人
        </a>
    </li>
    <if condition="$share_num neq 1">
        <li class="">
            <a href="#tab2" data-toggle="tab" type="tab2">职位详情</a>
        </li>
        <li class="">
            <a href="#tab3" data-toggle="tab" type="tab3"><label class="label_n fp_num">{$contacts_list|count}</label>联系人</a>
        </li>
        <!--<li class="">-->
        <!--<a href="#tab4" data-toggle="tab" type="tab4">跟进记录</a>-->
        <!--</li>-->
        <!--<li class="">-->
        <!--<a href="#tab5" data-toggle="tab" type="tab5">合同</a>-->
        <!--</li>-->
        <li class="">
            <a href="#tab6" data-toggle="tab" type="tab6"><label class="label_n fp_num">{$invoice|count}</label>发票列表</a>
        </li>
    </if>
    <li class="">
        <a href="#tab1" data-toggle="tab" type="tab1"><label class="label_n bz_num" style="display: none">8</label>跟进记录</a>
    </li>
    <!--<li class="">-->
    <!--<a href="#tab9" data-toggle="tab" type="tab9">日程</a>-->
    <!--</li>-->
    <!--<if condition = "$business_id eq ''">-->
    <!--<li class="">-->
    <!--<a href="#tab8" data-toggle="tab" type="tab8">操作记录</a>-->
    <!--</li>-->
    <!--</if>-->
    <li class="">
        <a href="#tab7" data-toggle="tab" type="tab7"><label class="label_n fj_num" style="display: none">8</label>附件</a>
    </li>

    <!--  <div class="nav pull-right">
         <if condition = "$is_business_code eq 1">
             <span style="line-height: 30px;">（ 商机编号：{$business[0]['code']} ）</span>
         </if>
     </div> -->
</ul>
<div class="tab-content">
    <div id="tab0"  class="tab-pane fade in active">
        <div class="panel-body" style="padding-left: 0px;">
            <div class="ibox">

                <div class="" style="padding-bottom: 15px">
                    <a class="btn btn-default" href="/index.php?m=product&a=add&pro_id={:I('id')}">新增一份简历</a>
                    <a class="btn btn-default" href="/index.php?m=product&a=index&pro_id={:I('id')}" target="_blank">从人才库搜索</a>
                    <div id="picker">简历解析</div>
                    <!--<a class="btn btn-default" href="/index.php?m=product&a=add_more&pro_id={$project['business_id']}" target="_blank">批量导入简历</a>-->
                </div>
                <script>
                    $(function () {
                        $(".call_out").on('click',function () {
                            var itemId = $(this).attr('rel');
                            $.post(
                                "{:U('callcenter/call_out')}",
                                {itemId: itemId,type:1,tel:''},
                                function (data) {
                                    var obj = $.parseJSON(data);
                                    if(obj.code){
                                       swal("操作成功！", "拨打电话成功,请稍等电话接通！", "success");
//                                     alert_crm(data.message);
                                    }else{
                                        alert_crm(obj.msg+",请联系管理员！");
                                    }
                                }
                            );
                        });
                        let pro_id = "{:I('id')}";
                        var uploader = WebUploader.create({
                            swf: '__PUBLIC__/webuploader/Uploader.swf',
                            server: '/index.php?m=product&a=resolve',
                            pick: {
                                id: '#picker',
                                multiple: false,
                            },
                            auto: true,
                            resize: false,
                            accept: {
                                extensions: 'doc,docx,html,pdf',
                            },
                            duplicate: true,
                            'fileSingleSizeLimit': 1024 * 1024,
                            // fileNumLimit:1,
                            formData: {pro_id: pro_id}
                        });
                        uploader.on('uploadProgress', function (file, percentage) {
                        });
                        uploader.on('uploadSuccess', (file, res) => {
                            swal(res.message, "", res.code == 200 ? 'success' : "warning");
                            if (res.code == 200) {
                                setTimeout(() => {
                                    location.reload();
                                }, 1000)
                            }

                        })
                        uploader.on('uploadError', (file, res) => {
                            swal(res.message, "", res.code == 200 ? 'success' : "warning");
                            if (res.code == 200) {
                                setTimeout(() => {
                                    location.reload();
                                }, 1000)
                            }

                        })
                        uploader.on('error', type => {
                            if (type == 'Q_TYPE_DENIED') {
                                swal('上传类型错误', "", "warning");
                            } else if (type == 'Q_EXCEED_SIZE_LIMIT') {
                                swal('文件过大', "", "warning");
                            }
                        });
                        uploader.on('beforeFileQueued', file => {

                        });
                    });
                </script>
                <div class="houxuanren" style="padding-bottom: 15px">
                    <ul class="nav nav-tabs" style="background: #f9fafc;height: 70px;">
                        <!--<li class="active"><a class="" href="#tj"  data-toggle="tab" type="tj">智能推荐</a></li>-->
                        <if condition="$business_info['pro_type'] eq '1'">
                            <li><a class="" href="#st1"  data-toggle="tab" type="st1">CallList（{$project['calllist']|count}）</a></li>
                            <li><a class="btn btn-primarya" href="#st2"  data-toggle="tab" type="st2">顾问面试（{$project['adviser']|count}）</a></li>
                            <li><a class="btn btn-primarya" href="#st3"  data-toggle="tab" type="st3">推荐人才（{$project['tj']|count}）</a></li>
                            <li><a class="btn btn-primarya" href="#st4"  data-toggle="tab" type="st4">面试（{$project['interview']|count}）</a></li>
                            <elseif  condition="$business_info['pro_type'] eq '2'" />
                            <li><a class="" href="#st1"  data-toggle="tab" type="st1">CallList（{$project['calllist']|count}）</a></li>
                            <li><a class="btn btn-primarya" href="#st2"  data-toggle="tab" type="st2">顾问面试（{$project['adviser']|count}）</a></li>
                            <li><a class="btn btn-primarya" href="#st3"  data-toggle="tab" type="st3">推荐人才（{$project['tj']|count}）</a></li>
                            <li><a class="btn btn-primarya" href="#st4"  data-toggle="tab" type="st4">面试（{$project['interview']|count}）</a></li>
                            <li><a class="btn btn-primarya" href="#st5"  data-toggle="tab" type="st5">面试通过（{$project['pass']|count}）</a></li>
                            <li><a class="btn btn-primarya" href="#st6"  data-toggle="tab" type="st6">Offer（{$project['offer']|count}）</a></li>
                            <li><a class="btn btn-primarya" href="#st7"  data-toggle="tab" type="st7">入职（{$project['enter']|count}）</a></li>
                            <elseif  condition="$business_info['pro_type'] eq '3'" />
                            <li><a class="" href="#st1"  data-toggle="tab" type="st1">CallList（{$project['calllist']|count}）</a></li>
                            <li><a class="btn btn-primarya" href="#st2"  data-toggle="tab" type="st2">顾问面试（{$project['adviser']|count}）</a></li>
                            <li><a class="btn btn-primarya" href="#st3"  data-toggle="tab" type="st3">推荐人才（{$project['tj']|count}）</a></li>
                            <li><a class="btn btn-primarya" href="#st4"  data-toggle="tab" type="st4">面试（{$project['interview']|count}）</a></li>
                            <li><a class="btn btn-primarya" href="#st5"  data-toggle="tab" type="st5">面试通过（{$project['pass']|count}）</a></li>
                            <li><a class="btn btn-primarya" href="#st6"  data-toggle="tab" type="st6">Offer（{$project['offer']|count}）</a></li>
                            <li><a class="btn btn-primarya" href="#st7"  data-toggle="tab" type="st7">入职（{$project['enter']|count}）</a></li>
                            <li><a class="btn btn-primarya" href="#st8"  data-toggle="tab" type="st8">过保（{$project['safe']|count}）</a></li>
                            <elseif  condition="$business_info['pro_type'] eq '4'" />
                            <li><a class="" href="#st1"  data-toggle="tab" type="st1">推荐简历（{$project['calllist']|count}）</a></li>
                        </if>
                    </ul>
                </div>

                <div class="tab-content">
                    <div id="tj"  class="tab-pane fade in active tab-content">
                        <div class="title-bar" style="position: relative;z-index: 99;display: none;">
                            <div class="row  clearfix" id="title-hide" style="display: block;">
                                <input type="hidden" class="select_arr" value="">
                                <ul class="breadcrum pull-left">
                                    <li>已选中&nbsp;<span class="icheck_num"></span>&nbsp;项</li>
                                    <li><a class="add_customer" href="javascript:void(0)" rel="addcc"><i class="fa fa-users"></i>&nbsp;加入CallList</a></li>
                                    <li class="last_li" style="bottom: 10px;"><big><a class="fa fa-times pull-right back-show" id="back-show"></a></big></li>
                                </ul>
                            </div>
                        </div>
                        <table class="table select-table">
                            <tr class="tabTh" style="background-color:#f9fafc;">
                                <td width="30px" style="border-left: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">
                                    <div class="checkbox checkbox-primary">
                                        <input name="checkall" class="check_list" type="checkbox">
                                        <label></label>
                                    </div>
                                </td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">姓名</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">操作</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">公司名称</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">职位</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">性别</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">年薪</td>
                                <!-- <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">联系方式</td> -->
                                <td style="border-right: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">最近操作时间</td>
                            </tr>
                            <tbody>
                            <if condition="$project['calllist']">
                            </if>
                            </tbody>
                        </table>
                    </div>

                    <div id="st1" class="tab-pane fade in tab-content">
                        <table class="table select-table">
                            <tr class="tabTh" style="background-color:#f9fafc;">
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">姓名</td>
                                <td style="text-align:right;background-color:#f9fafc;padding:14px;color:#999">项目阶段</td>
                                <td style="text-align:left;background-color:#f9fafc;padding:14px;color:#999"></td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">公司名称</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">职位</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">性别</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">年薪</td>
                                <!-- <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">联系方式</td> -->
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">跟进人</td>
                                <td style="border-right: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">最近操作时间</td>
                            </tr>
                            <tbody>


                            <volist name="project[calllist]" id="vo">
                                <tr>
                                    <td style="text-align:center;padding:14px;color:#666;">
                                        <a href="{:U('product/view','id='.$vo['resume_id'])}">{$vo['name']}</a>
                                        <a class="dropdown-toggle count-info call_out" id="phone_url" rel="{$vo['resume_id']}" data-toggle="dropdown" href="#" title="呼叫">
                                            <span class="glyphicon glyphicon-earphone" id="phone_num"></span>
                                        </a>
                                    </td>


                                <if condition="$business_info['pro_type'] eq '4'">
                                    <if condition="$vo['hjl_status'] eq 0">
                                        <td style="text-align:right;padding:14px;color:#666;"><input type="button"  class="btn btn-primary btn-sm upresumes"  value="推荐 >" style="width: 80px;" data-id="{$vo['id']}"></td>
                                        <elseif condition="$vo['hjl_status'] eq 1" />
                                        <td style="text-align:right;padding:14px;color:#666;">已推荐</td>
                                        <elseif condition="$vo['hjl_status'] eq 2" />
                                        <td style="text-align:right;padding:14px;color:#666;">客户选取</td>
                                    </if>
                                    <else  />
                                    <td style="text-align:right;padding:14px;color:#666;"><input type="button" class="btn btn-primary btn-sm slidebar-nav" value="CallList >" style="width: 80px;" data-id="{$vo['id']}"></td>
                                </if>


                                <td style="text-align:left;padding:14px;color:#666;">

                                <if condition="$vo['call_result']">
                                    <span class="icosgj">
                                        <embed src="/Public/img/svg/{$call_ico1[$vo['call_result']]}.svg" width="30px" height="30px"
                                               type="image/svg+xml"
                                               pluginspage="http://www.adobe.com/svg/viewer/install/" />
                                        <div class="beizhus">{$vo['call_result']}</div>
                                    </span>
                                    <span class="icosgj">
                                        <embed src="/Public/img/svg/{$call_ico2[$vo['ccgj']]}.svg" width="30px" height="30px"
                                               type="image/svg+xml"
                                               pluginspage="http://www.adobe.com/svg/viewer/install/" />
                                        <div class="beizhus">
                                            <if condition="$vo['ccgj']">
                                                继续跟进
                                                <else />
                                                暂停跟进
                                            </if>
                                        </div>
                                    </span>
                                    <span class="icosgj">
                                        <embed src="/Public/img/svg/{$call_ico3[$vo['target']]}.svg" width="30px" height="30px"
                                               type="image/svg+xml"
                                               pluginspage="http://www.adobe.com/svg/viewer/install/" />
                                        <div class="beizhus">
                                            <if condition="$vo['target']">
                                                是目标候选人
                                                <else />
                                                不是目标候选人
                                            </if>
                                        </div>
                                    </span>
                                </if>
                                </td>
                                <td style="text-align:center;padding:14px;color:#666;">
                                    <div class="nowap" style="max-width: 100px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;" title="{$vo['current_company']}">{$vo['current_company']}</div>
                                </td>
                                <td style="text-align:center;padding:14px;color:#666;">
                                    <div class="nowap" style="max-width: 100px;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;" title=" {$vo['current_job']}"> {$vo['current_job']}</div>
                                </td>
                                <td style="text-align:center;padding:14px;color:#666;"><if condition="$vo['sex'] eq 1">男<else/>女</if></td>
                                <td style="text-align:center;padding:14px;color:#666;">{$vo['curSalary']}万</td>
                                <!-- <td style="text-align:center;padding:14px;color:#666;">{$vo['telephone']}</td> -->
                                <td style="text-align:center;padding:14px;color:#666;"><a href="javascript:void(0);" class="role_info" rel="{$vo['tracker']}">{$vo['tracker_name']}</a></td>
                                <td style="border-right: 1px solid #e7eaec;text-align:center;padding:14px;color:#666;">{$vo['addtime']|date='Y-m-d H:i:s',###}</td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>
                    </div>
                    <div id="st2" class="tab-pane fade in tab-content">
                        <table class="table select-table">
                            <tr class="tabTh" style="background-color:#f9fafc;">
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">姓名</td>
                                <td style="text-align:right;background-color:#f9fafc;padding:14px;color:#999">项目阶段</td>
                                <td style="text-align:left;background-color:#f9fafc;padding:14px;color:#999"></td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">公司名称</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">职位</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">性别</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">年薪</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">跟进人</td>
                                <td style="border-right: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">最近操作时间</td>
                            </tr>
                            <tbody>
                            <if condition="$project['adviser']">
                                <volist name="project['adviser']" id="vo">
                                    <tr>
                                        <!--<td  width="30px" style="border-left: 1px solid #e7eaec;text-align:center;padding:14px;color:#999">-->
                                        <!--<div class="checkbox checkbox-primary">-->
                                        <!--<input name="checklist" value="1" class="check_list" type="checkbox">-->
                                        <!--<label></label>-->
                                        <!--</div>-->
                                        <!--</td>-->
                                        <td style="text-align:center;padding:14px;color:#666;"><a href="{:U('product/view','id='.$vo['resume_id'])}">{$vo['name']}</a></td>
                                        <td style="text-align:right;padding:14px;color:#666;"><input type="button" class="btn btn-primary btn-sm slidebar-nav" value="顾问面试 >"   data-id="{$vo['id']}" style="width: 80px;"></td>
                                        <td style="text-align:left;padding:14px;color:#666;">
                                    <if condition="$vo['adgj']">
                                        <span class="icosgj">
                                            <embed src="/Public/img/svg/{$adviser_ico[$vo['adgj']]}.svg" width="30px" height="30px"
                                                   type="image/svg+xml"
                                                   pluginspage="http://www.adobe.com/svg/viewer/install/" />
                                            <div class="beizhus">
                                                <if condition="$vo['adgj']">
                                                    继续跟进
                                                    <else />
                                                    暂停跟进
                                                </if>
                                            </div>
                                        </span>

                                        <span class="icosgj">
                                            <embed src="/Public/img/svg/goutong.svg" width="30px" height="30px"
                                                   type="image/svg+xml"
                                                   pluginspage="http://www.adobe.com/svg/viewer/install/" />
                                            <div class="beizhus">已沟通</div>
                                        </span>
                                        <else/>
                                        <span class="icosgj">
                                            <embed src="/Public/img/svg/daigoutong.svg" width="30px" height="30px"
                                                   type="image/svg+xml"
                                                   pluginspage="http://www.adobe.com/svg/viewer/install/" />
                                            <div class="beizhus">需要我沟通</div>
                                        </span>
                                    </if>
                                    </td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['current_company']}</td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['current_job']}</td>
                                    <td style="text-align:center;padding:14px;color:#666;"><if condition="$vo['sex'] eq 1">男<else/>女</if></td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['curSalary']}万</td>
                                    <!-- <td style="text-align:center;padding:14px;color:#666;">{$vo['telphone']}</td> -->
                                    <td style="text-align:center;padding:14px;color:#666;"><a href="javascript:void(0);" class="role_info" rel="{$vo['tracker']}">{$vo['tracker_name']}</a></td>
                                    <td style="border-right: 1px solid #e7eaec;text-align:center;padding:14px;color:#666;">{$vo['updatetime']|date='Y-m-d H:i:s',###}</td>
                                    </tr>
                                </volist>
                            </if>
                            </tbody>
                        </table>
                    </div>
                    <div id="st3" class="tab-pane fade in tab-content">
                        <!--<div class="title-bar" style="position: relative;z-index: 99;display: none;">-->
                        <!--<div class="row  clearfix" id="title-hide" style="display: block;">-->
                        <!--<input type="hidden" class="select_arr" value="">-->
                        <!--<ul class="breadcrum pull-left">-->
                        <!--<li>已选中&nbsp;<span class="icheck_num"></span>&nbsp;项</li>-->
                        <!--<li><a class="add_customer" href="javascript:void(0)"  rel="buheshi">&nbsp;设为不合适</a></li>-->
                        <!--<li class="last_li" style="bottom: 10px;"><big><a class="fa fa-times pull-right back-show" id="back-show"></a></big></li>-->
                        <!--</ul>-->
                        <!--</div>-->
                        <!--</div>-->
                        <table class="table select-table">
                            <tr class="tabTh" style="background-color:#f9fafc;">
                                <!--<td width="30px" style="border-left: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">-->
                                <!--<div class="checkbox checkbox-primary">-->
                                <!--<input name="checkall" class="check_list" type="checkbox">-->
                                <!--<label></label>-->
                                <!--</div>-->
                                <!--</td>-->
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">姓名</td>
                                <td style="text-align:right;background-color:#f9fafc;padding:14px;color:#999">项目阶段</td>
                                <td style="text-align:left;background-color:#f9fafc;padding:14px;color:#999"></td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">公司名称</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">职位</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">性别</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">年薪</td>
                                <!-- <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">联系方式</td> -->
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">跟进人</td>
                                <td style="border-right: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">最近操作时间</td>
                            </tr>
                            <tbody>
                            <if condition="$project['tj']">
                                <volist name="project['tj']" id="vo">
                                    <tr>
                                        <!--<td  width="30px" style="border-left: 1px solid #e7eaec;text-align:center;padding:14px;color:#999">-->
                                        <!--<div class="checkbox checkbox-primary">-->
                                        <!--<input name="checklist" value="1" class="check_list" type="checkbox">-->
                                        <!--<label></label>-->
                                        <!--</div>-->
                                        <!--</td>-->
                                        <td style="text-align:center;padding:14px;color:#666;"><a href="{:U('product/view','id='.$vo['resume_id'])}">{$vo['name']}</a></td>
                                        <td style="text-align:right;padding:14px;color:#666;"><input type="button" class="btn btn-primary btn-sm slidebar-nav" value="推荐人才 >"   data-id="{$vo['id']}" style="width: 80px;"></td>
                                        <td style="text-align:left;padding:14px;color:#666;">
                                    <if condition="$vo['stop']">
                                        <span class="icosgj">
                                            <embed src="/Public/img/svg/sbuheshi.svg" width="30px" height="30px"
                                                   type="image/svg+xml"
                                                   pluginspage="http://www.adobe.com/svg/viewer/install/" />
                                            <div class="beizhus">不合适</div>
                                        </span>
                                    </if>
                                    </td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['current_company']}</td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['current_job']}</td>
                                    <td style="text-align:center;padding:14px;color:#666;"><if condition="$vo['sex'] eq 1">男<else/>女</if></td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['curSalary']}万</td>
                                    <!-- <td style="text-align:center;padding:14px;color:#666;">{$vo['telphone']}</td> -->
                                    <td style="text-align:center;padding:14px;color:#666;"><a href="javascript:void(0);" class="role_info" rel="{$vo['tracker']}">{$vo['tracker_name']}</a></td>
                                    <td style="border-right: 1px solid #e7eaec;text-align:center;padding:14px;color:#666;">{$vo['updatetime']|date='Y-m-d H:i:s',###}</td>
                                    </tr>
                                </volist>
                            </if>
                            </tbody>
                        </table>
                    </div>
                    <div id="st4" class="tab-pane fade in tab-content">
                        <table class="table select-table">
                            <tr class="tabTh" style="background-color:#f9fafc;">
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">姓名</td>
                                <td style="text-align:right;background-color:#f9fafc;padding:14px;color:#999">项目阶段</td>
                                <td style="text-align:left;background-color:#f9fafc;padding:14px;color:#999"></td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">公司名称</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">职位</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">性别</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">年薪</td>
                                <!-- <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">联系方式</td> -->
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">跟进人</td>
                                <td style="border-right: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">最近操作时间</td>
                            </tr>
                            <tbody>
                            <if condition="$project['interview']">
                                <volist name="project['interview']" id="vo">
                                    <tr>
                                        <td style="text-align:center;padding:14px;color:#666;"><a href="{:U('product/view','id='.$vo['resume_id'])}">{$vo['name']}</a></td>
                                        <td style="text-align:right;padding:14px;color:#666;"><input type="button" class="btn btn-primary btn-sm slidebar-nav" value="客户面试 >"  data-id="{$vo['id']}" style="width: 80px;"></td>
                                        <td style="text-align:left;padding:14px;color:#666;">
                                    <if condition="$vo['stop']">
                                        <span class="icosgj">
                                            <embed src="/Public/img/svg/sbuheshi.svg" width="30px" height="30px"
                                                   type="image/svg+xml"
                                                   pluginspage="http://www.adobe.com/svg/viewer/install/" />
                                            <div class="beizhus">不合适</div>
                                        </span>
                                    </if>
                                    </td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['current_company']}</td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['current_job']}</td>
                                    <td style="text-align:center;padding:14px;color:#666;"><if condition="$vo['sex'] eq 1">男<else/>女</if></td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['curSalary']}万</td>
                                    <td style="text-align:center;padding:14px;color:#666;"><a href="javascript:void(0);" class="role_info" rel="{$vo['tracker']}">{$vo['tracker_name']}</a></td>
                                    <td style="border-right: 1px solid #e7eaec;text-align:center;padding:14px;color:#666;">{$vo['updatetime']|date='Y-m-d H:i:s',###}</td>
                                    </tr>
                                </volist>
                            </if>
                            </tbody>
                        </table>
                    </div>
                    <div id="st5" class="tab-pane fade in tab-content">
                        <table class="table select-table">
                            <tr class="tabTh" style="background-color:#f9fafc;">
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">姓名</td>
                                <td style="text-align:right;background-color:#f9fafc;padding:14px;color:#999">项目阶段</td>
                                <td style="text-align:left;background-color:#f9fafc;padding:14px;color:#999"></td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">公司名称</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">职位</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">性别</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">年薪</td>
                                <!-- <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">联系方式</td> -->
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">跟进人</td>
                                <td style="border-right: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">最近操作时间</td>
                            </tr>
                            <tbody>
                            <if condition="$project['pass']">
                                <volist name="project['pass']" id="vo">
                                    <tr>
                                        <td style="text-align:center;padding:14px;color:#666;"><a href="{:U('product/view','id='.$vo['resume_id'])}">{$vo['name']}</a></td>
                                        <td style="text-align:right;padding:14px;color:#666;"><input type="button" class="btn btn-primary btn-sm slidebar-nav" value="面试通过 >"  data-id="{$vo['id']}" style="width: 80px;"></td>
                                        <td style="text-align:left;padding:14px;color:#666;">
                                    <if condition="$vo['stop']">
                                        <span class="icosgj">
                                            <embed src="/Public/img/svg/sbuheshi.svg" width="30px" height="30px"
                                                   type="image/svg+xml"
                                                   pluginspage="http://www.adobe.com/svg/viewer/install/" />
                                            <div class="beizhus">不合适</div>
                                        </span>
                                    </if>
                                    </td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['current_company']}</td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['current_job']}</td>
                                    <td style="text-align:center;padding:14px;color:#666;"><if condition="$vo['sex'] eq 1">男<else/>女</if></td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['curSalary']}万</td>
                                    <td style="text-align:center;padding:14px;color:#666;"><a href="javascript:void(0);" class="role_info" rel="{$vo['tracker']}">{$vo['tracker_name']}</a></td>
                                    <td style="border-right: 1px solid #e7eaec;text-align:center;padding:14px;color:#666;">{$vo['updatetime']|date='Y-m-d H:i:s',###}</td>
                                    </tr>
                                </volist>
                            </if>
                            </tbody>
                        </table>
                    </div>
                    <div id="st6" class="tab-pane fade in tab-content">
                        <table class="table select-table">
                            <tr class="tabTh" style="background-color:#f9fafc;">
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">姓名</td>
                                <td style="text-align:right;background-color:#f9fafc;padding:14px;color:#999">项目阶段</td>
                                <td style="text-align:left;background-color:#f9fafc;padding:14px;color:#999"></td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">公司名称</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">职位</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">性别</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">年薪</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">跟进人</td>
                                <td style="border-right: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">最近操作时间</td>
                            </tr>
                            <tbody>
                            <if condition="$project['offer']">
                                <volist name="project['offer']" id="vo">
                                    <tr>
                                        <td style="text-align:center;padding:14px;color:#666;"><a href="{:U('product/view','id='.$vo['resume_id'])}">{$vo['name']}</a></td>
                                        <td style="text-align:right;padding:14px;color:#666;"><input type="button" class="btn btn-primary btn-sm slidebar-nav" value="Offer >"  data-id="{$vo['id']}" style="width: 80px;"></td>
                                        <td style="text-align:left;padding:14px;color:#666;">
                                    <if condition="$vo['stop']">
                                        <span class="icosgj">
                                            <embed src="/Public/img/svg/sbuheshi.svg" width="30px" height="30px"
                                                   type="image/svg+xml"
                                                   pluginspage="http://www.adobe.com/svg/viewer/install/" />
                                            <div class="beizhus">不合适</div>
                                        </span>
                                    </if>
                                    </td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['current_company']}</td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['current_job']}</td>
                                    <td style="text-align:center;padding:14px;color:#666;"><if condition="$vo['sex'] eq 1">男<else/>女</if></td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['curSalary']}万</td>
                                    <!-- <td style="text-align:center;padding:14px;color:#666;">{$vo['telphone']}</td> -->
                                    <td style="text-align:center;padding:14px;color:#666;"><a href="javascript:void(0);" class="role_info" rel="{$vo['tracker']}">{$vo['tracker_name']}</a></td>
                                    <td style="border-right: 1px solid #e7eaec;text-align:center;padding:14px;color:#666;">{$vo['updatetime']|date='Y-m-d H:i:s',###} </td>
                                    </tr>
                                </volist>
                            </if>
                            </tbody>
                        </table>
                    </div>
                    <div id="st7" class="tab-pane fade in tab-content">
                        <table class="table select-table">
                            <tr class="tabTh" style="background-color:#f9fafc;">
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">姓名</td>
                                <td style="text-align:right;background-color:#f9fafc;padding:14px;color:#999">项目阶段</td>
                                <td style="text-align:left;background-color:#f9fafc;padding:14px;color:#999"></td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">公司名称</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">职位</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">性别</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">年薪</td>
                                <!-- <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">联系方式</td> -->
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">跟进人</td>
                                <td style="border-right: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">最近操作时间</td>
                            </tr>
                            <tbody>
                            <if condition="$project['enter']">
                                <volist name="project['enter']" id="vo">
                                    <tr>
                                        <td style="text-align:center;padding:14px;color:#666;"><a href="{:U('product/view','id='.$vo['resume_id'])}">{$vo['name']}</a></td>
                                        <td style="text-align:right;padding:14px;color:#666;"><input type="button" class="btn btn-primary btn-sm slidebar-nav" value="入职 >"  data-id="{$vo['id']}" style="width: 80px;"></td>
                                        <td style="text-align:left;padding:14px;color:#666;">
                                    <if condition="$vo['stop']">
                                        <span class="icosgj">
                                            <embed src="/Public/img/svg/sbuheshi.svg" width="30px" height="30px"
                                                   type="image/svg+xml"
                                                   pluginspage="http://www.adobe.com/svg/viewer/install/" />
                                            <div class="beizhus">不合适</div>
                                        </span>
                                    </if>
                                    </td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['current_company']}</td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['current_job']}</td>
                                    <td style="text-align:center;padding:14px;color:#666;"><if condition="$vo['sex'] eq 1">男<else/>女</if></td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['curSalary']}万</td>
                                    <!-- <td style="text-align:center;padding:14px;color:#666;">{$vo['telphone']}</td> -->
                                    <td style="text-align:center;padding:14px;color:#666;"><a href="javascript:void(0);" class="role_info" rel="{$vo['tracker']}">{$vo['tracker_name']}</a></td>
                                    <td style="border-right: 1px solid #e7eaec;text-align:center;padding:14px;color:#666;">{$vo['updatetime']|date='Y-m-d H:i:s',###}</td>
                                    </tr>
                                </volist>
                            </if>
                            </tbody>
                        </table>
                    </div>
                    <div id="st8" class="tab-pane fade in tab-content">
                        <table class="table select-table">
                            <tr class="tabTh" style="background-color:#f9fafc;">
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">姓名</td>
                                <td style="text-align:right;background-color:#f9fafc;padding:14px;color:#999">项目阶段</td>
                                <td style="text-align:left;background-color:#f9fafc;padding:14px;color:#999"></td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">公司名称</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">职位</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">性别</td>
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">年薪</td>
                                <!-- <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">联系方式</td> -->
                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">跟进人</td>
                                <td style="border-right: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">最近操作时间</td>
                            </tr>
                            <tbody>
                            <if condition="$project['safe']">
                                <volist name="project['safe']" id="vo">
                                    <tr>
                                        <td style="text-align:center;padding:14px;color:#666;"><a href="{:U('product/view','id='.$vo['resume_id'])}"><span class="" style="{$mail_contacts_id == $vo['contacts_id'] ? '':'display:none'}">{$vo['name']}</span></a></td>
                                        <td style="text-align:right;padding:14px;color:#666;"><input type="button" class="btn btn-primary btn-sm slidebar-nav" value="过保 >"  data-id="{$vo['id']}" style="width: 80px;"></td>
                                        <td style="text-align:left;padding:14px;color:#666;">
                                    <if condition="$vo['stop']">
                                        <span class="icosgj">
                                            <embed src="/Public/img/svg/sbuheshi.svg" width="30px" height="30px"
                                                   type="image/svg+xml"
                                                   pluginspage="http://www.adobe.com/svg/viewer/install/" />
                                            <div class="beizhus">不合适</div>
                                        </span>
                                    </if>
                                    </td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['current_company']}</td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['current_job']}</td>
                                    <td style="text-align:center;padding:14px;color:#666;"><if condition="$vo['sex'] eq 1">男<else/>女</if></td>
                                    <td style="text-align:center;padding:14px;color:#666;">{$vo['curSalary']}万</td>
                                    <!-- <td style="text-align:center;padding:14px;color:#666;">{$vo['telphone']}</td> -->
                                    <td style="text-align:center;padding:14px;color:#666;"><a href="javascript:void(0);" class="role_info" rel="{$vo['tracker']}">{$vo['tracker_name']}</a></td>
                                    <td style="border-right: 1px solid #e7eaec;text-align:center;padding:14px;color:#666;">{$vo['updatetime']|date='Y-m-d H:i:s',###}</td>
                                    </tr>
                                </volist>
                            </if>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div id="tab1" class="tab-pane fade in">
        <div class="panel-body">
            <if condition="$content neq 'resource'">
                <div id="form-div">
                    <form id="add-form" action="{:U('Log/add')}" method="post">
                        <input type='hidden' name="r" value="rBusinessLog"/>
                        <input type='hidden' name="module" value="business"/>
                        <input type='hidden' id="business_id" name="id" value="{$business_id}"/>
                        <input type='hidden' name="role_id" value="{$Think.session.role_id}"/>
                        <textarea name="content" placeholder="添加备注" id="log-text" style="resize:none;" class="form-control" cols="30" rows="2"></textarea>
                        <table class="table business_table" style="border:none;margin-top:15px;display:none;" id="business_table">
                            <tr >
                                <td class="tdleft" style="width:120px;">跟进类型：</td>
                                <td style="width:120px;">
                                    <select name="status_id" id="status_id" class="form-control" onchange="selectStatus()">
                                        <option value="">--请选择--</option>
                                        <volist name="status_list" id="vo">
                                            <option value="{$vo['id']}">{$vo['name']}</option>
                                        </volist>
                                    </select>
                                </td>
                                <td>&nbsp;&nbsp;</td>
                                <td class="tdleft" style="width:120px;">快捷添加：</td>
                                <td style="width:300px;">
                                    <select id="replay_list" class="form-control select2" onchange="selectReply()" style="width:80%;float:left;">
                                        <option value="">--请选择--</option>
                                        <volist name="reply_list" id="vo">
                                            <option value="{$vo['content']}" rel="{$vo['status_id']}">{$vo['str_content']}</option>
                                        </volist>
                                    </select>&nbsp;&nbsp;
                                    <a href="javascript:void(0)" id="setting_reply_dialog" title="管理快捷跟进模板" style="line-height: 30px;margin-left:10px;"><i class="fa fa-cog" style="color:#999;"></i></a>
                                </td>
                                <td>&nbsp;&nbsp;</td>
                            </tr>
                            <tr>
                                <td class="tdleft" style="width:120px;">下次联系时间：</td>
                                <td style="width:120px;">
                                    <input type="text" value="" id="nextstep_time_log" class="form-control Wdate" name="nextstep_time" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd HH:mm'})" style="width: 170px;">
                                </td>
                                <td>&nbsp;&nbsp;</td>
                                <td class="tdleft" style="width:120px;">保存为跟进模板：</td>
                                <td style="width:120px;">
                                    <div class="checkbox checkbox-primary">
                                        <input type="hidden" name="type" value="2" />
                                        <input name="save_reply" class="select_list" id="save_reply" type="checkbox" value="1"/>
                                        <label for=""></label>
                                    </div>
                                </td>
                                <td>&nbsp;&nbsp;</td>
                            </tr>
                            <?php if (empty($business_id)): ?>
                            <tr>
                                <td class="tdleft" style="width:120px;">关联商机：</td>
                                <td colspan="5">
                                    <div class="text-left" id="product-radio" style="padding-top:8px;">
                                        <?php if (empty($business_id)): ?>
                                        <volist name="business" key="key" id="vo">
                                            <div class="radio radio-info radio-inline" style="margin-left: 10px;">
                                                <input type="radio" name="id" class="business_code" id="status_{$key}" code="{$vo.code}" value="{$vo.business_id}">
                                                <label for="status_{$key}">&nbsp;{$vo.code}&nbsp;&nbsp;&nbsp;</label>&nbsp;&nbsp;
                                            </div>
                                        </volist>
                                        <?php endif; ?>
                                    </div>
                                </td>
                            </tr>
                            <?php endif; ?>
                        </table>
                        <div>
                            <div class="text-right" id="log-btn" style="padding-top:8px;display:none;"><button class="btn btn-primary" id="add_log" type="button">添加</button>&nbsp;</div><br>
                        </div>
                    </form>
                </div>
            </if>
            <div id="log-list" style="margin-top: 10px;">
                <volist name="log_list" id="vo">
                    <div class="ibox-content gray-log" log-rel="{$vo['log_id']}" >
                        <div class="social-feed-separated clearfix">
                            <div class="social-feed-box">
                                <if condition="$content neq 'resource' && $vo['sign'] eq '0' && $vo['role_id'] eq session('role_id')">
                                    <div class="pull-right social-action dropdown">
                                        <span data-toggle="dropdown" class="dropdown-toggle">
                                            <i style="font-size:20px;cursor:pointer" class="fa fa-angle-down"></i>
                                        </span>
                                        <ul class="dropdown-menu m-t-xs" >
                                            <li><a rel="{$vo['log_id']}" href="javascript:void(0);" type="{$vo['log_type']}" onclick="del_confirm(this);">{:L('DELETE')}</a></li>
                                        </ul>
                                    </div>
                                </if>
                                <if condition = "$vo['sign'] eq 1">
                                    <div class="social-avatar">
                                        <img alt="image" style="width:35px;height:35px;" class="img-circle" src="{$vo['owner']['thumb_path']}">
                                        <a class="role_info name-colors"  rel="{$vo['owner']['role_id']}" href="javascript:void(0);">{$vo['owner']['full_name']}</a>&nbsp;&nbsp;
                                        <span class="text-muted">发布了一条签到记录</span>&nbsp;&nbsp;&nbsp;
                                        <span class="text-muted" >{$vo['create_date']|date="Y-m-d H:i",###}</span>
                                        <div class="text-muted" style="padding:0 15px 0 50px;">
                                            <div class="conent0" style="width:100%;">
                                                <img style="width:15px;height:15px;vertical-align:text-bottom;" src="__PUBLIC__/img/location.png"/>
                                                <span style="color:#666">{$vo['sign_info']['address']}</span>
                                                <input class="longitude" type="hidden" rel="{$vo['sign_info']['y']}"/>
                                                <!-- <a href="javascript:void(0);" style="font-size:12px;" class="map" >显示地图</a> -->
                                                <div id="allmap{$vo['log_id']}" rel="allmap{$vo['log_id']}" class="allmap"></div>
                                                <input class="latitude" type="hidden" rel="{$vo['sign_info']['x']}"/>
                                            </div>
                                            <div class="conent0">
                                                <span style="color:#000">签到说明：{$vo['sign_info']['log']}</span>
                                            </div>
                                            <div class="conent0">
                                                <div style="color:#000">现场照片：</div>
                                                <volist name="vo['sign_img']" id="v">
                                                    <div class="box-secondary" rel="{$vo.img_id}" style="width:100px;height:100px;float:left;margin-left:5px;">
                                                        <a href="{$v.path}" target="_self" class="litebox_file" data-litebox-group="group-{$vo['log_id']}">
                                                            <img src="{$v.path}" class="thumbnail thumb100" style="width:100%;height:100%;">
                                                        </a>
                                                    </div>
                                                </volist>
                                                <div style="clear:both;"></div>
                                            </div>
                                        </div>
                                    </div>
                                    <else />
                                    <div class="social-avatar">
                                        <img alt="image" style="width:35px;height:35px;" class="img-circle" src="{$vo['owner']['thumb_path']}">
                                        <a class="role_info name-colors"  rel="{$vo.owner.role_id}" href="javascript:void(0);">{$vo['owner']['full_name']}</a>&nbsp;&nbsp;
                                        <span class="text-muted">发布了一条快速记录</span>&nbsp;&nbsp;&nbsp;
                                        <span class="text-muted" >{$vo.create_date|date="Y-m-d H:i",###}&nbsp;&nbsp;<a title="沟通类型" href="javascript:void(0);">{$vo['status_name']}</a></span>
                                    </div>
                                    <div class="social-body">
                                        <span style="word-wrap:break-word;line-height: 21px;color: #000;">{$vo['content']}</span>

                                        <if condition = "$vo['nextstep_time']">
                                            <div class="social-avatar" style="padding-top:10px;">
                                                <span class="text-muted pull-right">下次联系时间：{$vo['nextstep_time']|date="Y-m-d H:i",###}</span>
                                            </div>
                                        </if>
                                    </div>
                                </if>
                            </div>
                        </div>
                    </div>
                </volist>
            </div>
        </div>
    </div>
    <div id="tab4" class="tab-pane fade in">
        <div class="panel-body">
            <if condition="$content neq 'resource'">
                <div id="form-div">
                    <form id="add-form" action="{:U('Log/add')}" method="post">
                        <input type='hidden' name="r" value="rBusinessLog"/>
                        <input type='hidden' name="module" value="business"/>
                        <input type='hidden' id="business_id" name="id" value="{$business_id}"/>
                        <input type='hidden' name="role_id" value="{$Think.session.role_id}"/>
                        <textarea name="content" placeholder="添加跟进记录" id="log-text" style="resize:none;" class="form-control" cols="30" rows="2"></textarea>
                        <table class="table business_table" style="border:none;margin-top:15px;display:none;" id="business_table">
                            <tr >
                                <td class="tdleft" style="width:120px;">跟进类型：</td>
                                <td style="width:120px;">
                                    <select name="status_id" id="status_id" class="form-control" onchange="selectStatus()">
                                        <option value="">--请选择--</option>
                                        <volist name="status_list" id="vo">
                                            <option value="{$vo['id']}">{$vo['name']}</option>
                                        </volist>
                                    </select>
                                </td>
                                <td>&nbsp;&nbsp;</td>
                                <td class="tdleft" style="width:120px;">快捷添加：</td>
                                <td style="width:300px;">
                                    <select id="replay_list" class="form-control select2" onchange="selectReply()" style="width:80%;float:left;">
                                        <option value="">--请选择--</option>
                                        <volist name="reply_list" id="vo">
                                            <option value="{$vo['content']}" rel="{$vo['status_id']}">{$vo['str_content']}</option>
                                        </volist>
                                    </select>&nbsp;&nbsp;
                                    <a href="javascript:void(0)" id="setting_reply_dialog" title="管理快捷跟进模板" style="line-height: 30px;margin-left:10px;"><i class="fa fa-cog" style="color:#999;"></i></a>
                                </td>
                                <td>&nbsp;&nbsp;</td>
                            </tr>
                            <tr>
                                <td class="tdleft" style="width:120px;">下次联系时间：</td>
                                <td style="width:120px;">
                                    <input type="text" value="" id="nextstep_time_log" class="form-control Wdate" name="nextstep_time" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd HH:mm'})" style="width: 170px;">
                                </td>
                                <td>&nbsp;&nbsp;</td>
                                <td class="tdleft" style="width:120px;">保存为跟进模板：</td>
                                <td style="width:120px;">
                                    <div class="checkbox checkbox-primary">
                                        <input type="hidden" name="type" value="2" />
                                        <input name="save_reply" class="select_list" id="save_reply" type="checkbox" value="1"/>
                                        <label for=""></label>
                                    </div>
                                </td>
                                <td>&nbsp;&nbsp;</td>
                            </tr>
                            <?php if (empty($business_id)): ?>
                            <tr>
                                <td class="tdleft" style="width:120px;">关联商机：</td>
                                <td colspan="5">
                                    <div class="text-left" id="product-radio" style="padding-top:8px;">
                                        <?php if (empty($business_id)): ?>
                                        <volist name="business" key="key" id="vo">
                                            <div class="radio radio-info radio-inline" style="margin-left: 10px;">
                                                <input type="radio" name="id" class="business_code" id="status_{$key}" code="{$vo.code}" value="{$vo.business_id}">
                                                <label for="status_{$key}">&nbsp;{$vo.code}&nbsp;&nbsp;&nbsp;</label>&nbsp;&nbsp;
                                            </div>
                                        </volist>
                                        <?php endif; ?>
                                    </div>
                                </td>
                            </tr>
                            <?php endif; ?>
                        </table>
                        <div>
                            <div class="text-right" id="log-btn" style="padding-top:8px;display:none;"><button class="btn btn-primary" id="add_log" type="button">添加</button>&nbsp;</div><br>
                        </div>
                    </form>
                </div>
            </if>
            <div id="log-list" style="margin-top: 10px;">
                <volist name="log_list" id="vo">
                    <div class="ibox-content gray-log" log-rel="{$vo['log_id']}" >
                        <div class="social-feed-separated clearfix">
                            <div class="social-feed-box">
                                <if condition="$content neq 'resource' && $vo['sign'] eq '0' && $vo['role_id'] eq session('role_id')">
                                    <div class="pull-right social-action dropdown">
                                        <span data-toggle="dropdown" class="dropdown-toggle">
                                            <i style="font-size:20px;cursor:pointer" class="fa fa-angle-down"></i>
                                        </span>
                                        <ul class="dropdown-menu m-t-xs" >
                                            <li><a rel="{$vo['log_id']}" href="javascript:void(0);" type="{$vo['log_type']}" onclick="del_confirm(this);">{:L('DELETE')}</a></li>
                                        </ul>
                                    </div>
                                </if>
                                <if condition = "$vo['sign'] eq 1">
                                    <div class="social-avatar">
                                        <img alt="image" style="width:35px;height:35px;" class="img-circle" src="{$vo['owner']['thumb_path']}">
                                        <a class="role_info name-colors"  rel="{$vo['owner']['role_id']}" href="javascript:void(0);">{$vo['owner']['full_name']}</a>&nbsp;&nbsp;
                                        <span class="text-muted">发布了一条签到记录</span>&nbsp;&nbsp;&nbsp;
                                        <span class="text-muted" >{$vo['create_date']|date="Y-m-d H:i",###}</span>
                                        <div class="text-muted" style="padding:0 15px 0 50px;">
                                            <div class="conent0" style="width:100%;">
                                                <img style="width:15px;height:15px;vertical-align:text-bottom;" src="__PUBLIC__/img/location.png"/>
                                                <span style="color:#666">{$vo['sign_info']['address']}</span>
                                                <input class="longitude" type="hidden" rel="{$vo['sign_info']['y']}"/>
                                                <!-- <a href="javascript:void(0);" style="font-size:12px;" class="map" >显示地图</a> -->
                                                <div id="allmap{$vo['log_id']}" rel="allmap{$vo['log_id']}" class="allmap"></div>
                                                <input class="latitude" type="hidden" rel="{$vo['sign_info']['x']}"/>
                                            </div>
                                            <div class="conent0">
                                                <span style="color:#000">签到说明：{$vo['sign_info']['log']}</span>
                                            </div>
                                            <div class="conent0">
                                                <div style="color:#000">现场照片：</div>
                                                <volist name="vo['sign_img']" id="v">
                                                    <div class="box-secondary" rel="{$vo.img_id}" style="width:100px;height:100px;float:left;margin-left:5px;">
                                                        <a href="{$v.path}" target="_self" class="litebox_file" data-litebox-group="group-{$vo['log_id']}">
                                                            <img src="{$v.path}" class="thumbnail thumb100" style="width:100%;height:100%;">
                                                        </a>
                                                    </div>
                                                </volist>
                                                <div style="clear:both;"></div>
                                            </div>
                                        </div>
                                    </div>
                                    <else />
                                    <div class="social-avatar">
                                        <img alt="image" style="width:35px;height:35px;" class="img-circle" src="{$vo['owner']['thumb_path']}">
                                        <a class="role_info name-colors"  rel="{$vo.owner.role_id}" href="javascript:void(0);">{$vo['owner']['full_name']}</a>&nbsp;&nbsp;
                                        <span class="text-muted">发布了一条快速记录</span>&nbsp;&nbsp;&nbsp;
                                        <span class="text-muted" >{$vo.create_date|date="Y-m-d H:i",###}&nbsp;&nbsp;<a title="沟通类型" href="javascript:void(0);">{$vo['status_name']}</a></span>
                                    </div>
                                    <div class="social-body">
                                        <span style="word-wrap:break-word;line-height: 21px;color: #000;">{$vo['content']}</span>
                                        <if condition = "$vo['code']">
                                            <div class="log-relation"><i class="fa fa-bookmark"></i>&nbsp;<span>相关商机 : {$vo['code']}</span></div>
                                        </if>
                                        <if condition = "$vo['nextstep_time']">
                                            <div class="social-avatar" style="padding-top:10px;">
                                                <span class="text-muted pull-right">下次联系时间：{$vo['nextstep_time']|date="Y-m-d H:i",###}</span>
                                            </div>
                                        </if>
                                    </div>
                                </if>
                            </div>
                        </div>
                    </div>
                </volist>
            </div>
        </div>
    </div>
    <div id="tab9" class="tab-pane fade in">
        <div class="panel-body">
            <div class="ibox">
                <empty name="event_list">
                    <include file="Public:nodata" />
                    <else />
                    <volist name="event_list" id="vo">
                        <div style="padding-bottom:20px;border-left:1px solid #ccc;margin: 5px 0 0 15px;">
                            <if condition="$vo['color']">
                                <i class="fa fa-circle pull-left" style="margin-left:-5px;color:{$vo['color']};font-size:12px;"></i>
                                <else />
                                <i class="fa fa-circle pull-left" style="margin-left:-5px;color:#FB8F7A;font-size:12px;"></i>
                            </if>
                            <div class="pull-left" style="margin-left:25px;color:#999">
                                <div>{$vo['start_date']|date="H:i",###}</div>
                                <div>{$vo['start_date']|date="Y/m/d",###}</div>
                            </div>
                            <div class="pull-left" style="margin-left:25px;color:#999">
                                <div style="margin-top:11px;">~</div>
                            </div>
                            <div class="pull-left" style="margin-left:25px;color:#999">
                                <div>{$vo['end_date']|date="H:i",###}</div>
                                <div>{$vo['end_date']|date="Y/m/d",###}</div>
                            </div>
                            <div class="pull-left" style="margin-left:25px;"><img src="{$vo['img']}" style="width:30px;height:30px;border-radius:50px;margin-top:5px;"></div>
                            <div class="pull-left" style="margin-left:10px;width:60%">
                                <div>{$vo['create_role_name']} &nbsp;<if condition="$vo['bus_num']">({$vo['bus_num']})</if></div>
                                <div>{$vo['subject']}</div>
                            </div>
                            <div style="clear:both"></div>
                        </div>
                    </volist>
                </empty>
            </div>
        </div>
    </div>
    <div id="tab2" class="tab-pane fade in">
        <div class="panel-body">
            <div class="ibox-content gray-log" style="border: none;padding: 10px 20px;margin-bottom: 20px;">
                基本要求
            </div>
            <div>
                <volist name="field_list" id="vo">
                    <if condition="$vo.form_type neq 'textarea'">
                        <if condition="$vo.field eq minsalary">
                            <div class="col-lg-6 form_bottm">
                                <div class="col-lg-3 text-right">年薪范围</div>
                                <div class="col-lg-7">￥{$business_info['minsalary']}-{$business_info['maxsalary']}万元</div>
                            </div>
                            <elseif condition="$vo.field eq minage" />
                            <div class="col-lg-6 form_bottm">
                                <div class="col-lg-3 text-right">年龄范围</div>
                                <div class="col-lg-7">{$business_info['minage']}-{$business_info['maxage']}岁</div>
                            </div>
                            <elseif condition="$vo.field eq minexp" />
                            <div class="col-lg-6 form_bottm">
                                <div class="col-lg-3 text-right">工作年限要求</div>
                                <div class="col-lg-7">{$business_info['minexp']}-{$business_info['maxexp']}年</div>
                            </div>
                            <elseif condition="$vo.field eq industry" />
                            <div class="col-lg-6 form_bottm">
                                <div class="col-lg-3 text-right">{$vo.name}</div>
                                <div class="col-lg-7">{$business_info['industryName']}</div>
                            </div>
                            <elseif condition="$vo.field eq address" />
                            <div class="col-lg-6 form_bottm">
                                <div class="col-lg-3 text-right">{$vo.name}</div>
                                <div class="col-lg-7">{$city_name[$business_info[$vo[field]]]}</div>
                            </div>
                            <elseif condition="$vo.field eq jobclass" />
                            <div class="col-lg-6 form_bottm">
                                <div class="col-lg-3 text-right">{$vo.name}</div>
                                <div class="col-lg-7">{$business_info['jobclassName']}</div>
                            </div>
                            <elseif condition="$vo.field eq pro_type || $vo.field eq customer_id || $vo.field eq contacts_id || $vo.field eq  grade" />

                            <elseif condition="$vo.field eq nextstep_time && $business_info[$vo[field]] eq 0" />

                            <else/>
                            <div class="col-lg-6 form_bottm">
                                <div class="col-lg-3 text-right">{$vo.name}</div>
                                <div class="col-lg-7">{$business_info[$vo[field]]}</div>
                            </div>
                        </if>
                    </if>
                </volist>

            </div>
            <volist name="field_list" id="vo">
                <if condition="$vo.form_type eq 'textarea'">
                    <div class="ibox-content gray-log contenttitle">
                        {$vo.name}
                    </div>
                    <div class="col-lg-12 contentview">{$business_info[$vo[field]]}</div>
                </if>
            </volist>
        </div>
    </div>
    <div id="tab3" class="tab-pane fade in">
        <div class="panel-body">
            <div class="ibox">
                <if condition="$content neq 'resource'">
                    <div class="pull-left" style="padding-bottom: 15px">
                        <!--<a class="btn btn-primary btn-sm" rel="{$customer_id}" rel1="{$business_id}" id="rel_contacts" style="" href="javascript:void(0);">关联联系人</a>-->
                        <if condition="$business_id">
                            <!--<a class="btn btn-primary btn-sm" href="{:U('contacts/add',array('redirect'=>'business','redirect_id'=>$business_id))}">添加联系人</a>-->
                            <else />
                            <!--<a class="btn btn-primary btn-sm" href="{:U('contacts/add',array('redirect'=>'customer','redirect_id'=>$customer_id))}">添加联系人</a>-->
                        </if>
                    </div>
                </if>
                <empty name="contacts_list">
                    <include file="Public:nodata" />
                    <else />
                    <table class="table select-table table-bordered">
                        <tr class="tabTh" style="background-color:#f9fafc;">
                            <td style="border-right: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">姓名</td>
                            <td style="border-right: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">重要程度</td>
                            <td style="border-right: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">职位</td>
                            <td style="border-right: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">尊称</td>
                            <td style="border-right: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">创建者</td>
                            <td style="border-right: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">创建时间</td>
                        </tr>
                        <tbody>
                        <volist name="contacts_list" id="vo">
                            <tr>
                                <td style="text-align:center;padding:14px;color:#666;border-right: 1px solid #e7eaec;">
                                    <a href="{:U('contacts/view','id='.$vo['contacts_id'])}">
                                        {$vo['name']}
                                        <span class="" style="{$mail_contacts_id == $vo['contacts_id'] ? '':'display:none'}">{$vo['name']}</span>
                                    </a>
                                    <a class="dropdown-toggle count-info call_out" id="phone_url" rel="{$vo['contacts_id']}" data-toggle="dropdown" href="#" title="呼叫">
                                        <span class="glyphicon glyphicon-earphone" id="phone_num"></span>
                                    </a>
                                </td>
                                <td style="text-align:center;padding:14px;color:#666;border-right: 1px solid #e7eaec;">{$vo['crm_dbxxve']}</td>
                                <td style="text-align:center;padding:14px;color:#666;border-right: 1px solid #e7eaec;">{$vo['post']}</td>
                                <td style="text-align:center;padding:14px;color:#666;border-right: 1px solid #e7eaec;">{$vo['saltname']}</td>
                                <td style="border-right: 1px solid #e7eaec;text-align:center;padding:14px;color:#999"><a class="role_info" rel="{$vo['creator_role_id']}" href="javascript:void(0)">{$vo['user_name']}</a></td>
                                <td style="border-right: 1px solid #e7eaec;text-align:center;padding:14px;color:#999">{$vo['create_time']|date="Y-m-d",###}</td>
                                <!--<td class="dropdown">-->
                                <!--<if condition="$content neq 'resource'">-->
                                <!--<span class="dropdown-toggle" data-toggle="dropdown" style="cursor:pointer;color:#8FA1B2">-->
                                <!--<i class="fa fa-angle-down fa-lg"></i>-->
                                <!--</span>-->
                                <!--<ul class="dropdown-menu">-->
                                <!--<if condition="$business_id">-->
                                <!--<li><a rel="{:U('contacts/relToBusiness',array('business_id'=>$business_id,'contacts_id'=>$vo['contacts_id'],'act_n'=>2))}" href="javascript:void(0);" class="not_rel_contacts" >解除关联</a></li>-->
                                <!--</if>-->
                                <!--<li><a href="{:U('contacts/edit',array('id'=>$vo['contacts_id']))}">编辑</a></li>-->
                                <!--<if condition="$business_id eq ''">-->
                                <!--<if condition="$vo['contacts_id'] neq $mail_contacts_id">-->
                                <!--<li><a title="" href="{:U('contacts/changeToFirstContact', 'id='.$vo['contacts_id'].'&customer_id='.$customer_id)}">设为首要</a></li>-->
                                <!--<li><a title="删除联系人" href="javascript:void(0)" class="del_contacts" rel="{$vo['contacts_id']}" rel1="delete">删除</a></li>-->
                                <!--<else />-->
                                <!--<li><a title="删除联系人" href="javascript:void(0)" class="del_contacts" rel="{$vo['contacts_id']}" rel1="mdelete" rel2="{$customer_id}">删除</a></li>-->
                                <!--</if>-->
                                <!--</if>-->
                                <!--</ul>-->
                                <!--</if>-->
                                <!--</td>-->
                            </tr>
                        </volist>
                        </tbody>
                    </table>
                </empty>
            </div>
        </div>
    </div>
    <div id="tab5" class="tab-pane fade in">
        <div class="panel-body">
            <div class="ibox">
                <div class="pull-left" style="padding-bottom: 15px">
                    <a class="btn btn-primary btn-sm" rel="{$customer_id}" rel1="{$business_id}" id="rel_contacts" style="" href="javascript:void(0);">添加合同</a>
                </div>
                <if condition="$contract_list">
                    <table class="table select-table table-bordered">
                        <thead>
                        <td style="background:#F9FaFC;text-align:center;color:#999;">合同编号</td>
                        <td style="background:#F9FaFC;text-align:center;color:#999;">合同标题</td>
                        <td style="background:#F9FaFC;text-align:center;color:#999;">审批状态</td>
                        <td style="background:#F9FaFC;text-align:center;color:#999;">合同状态</td>
                        <td style="background:#F9FaFC;text-align:center;color:#999;">预计回款金额（元）</td>
                        <td style="background:#F9FaFC;text-align:center;color:#999;">开始时间</td>
                        <td style="background:#F9FaFC;text-align:center;color:#999;">到期时间</td>
                        <td style="background:#F9FaFC;text-align:center;color:#999;">保证期</td>

                        <td style="background:#F9FaFC;text-align:center;color:#999;">创建者</td>
                        <td style="background:#F9FaFC;text-align:center;color:#999;"></td>

                        </thead>
                        <tbody class="body_border">
                        <volist name="contract_list" id="v">
                            <tr>
                                <td style="text-align:center;"><a href="{:U('contract/view','id='.$v['contract_id'])}">{$v['number']}</a></td>
                                <td style="text-align:center;">{$v['customer_name']}</td>
                                <td style="text-align:center;"><if condition="$v['is_checked'] eq '2'">
                                <span class="fa fa-circle" style="color:#F5715F"></span>&nbsp;&nbsp;&nbsp;拒绝
                                <elseif condition="$v['is_checked'] eq '1'"/>
                                <span class="fa fa-circle" style="color:#7CCA4E"></span>&nbsp;&nbsp;&nbsp;通过
                                <else />
                                <span class="fa fa-circle" style="color:#F5CA00"></span>&nbsp;&nbsp;&nbsp;待审
                            </if>
                            </td>
                            <td style="text-align:center;">寻访中</td>
                            <td style="text-align:center;">{$v.price}{:L('YUAN')}</td>
                            <td style="text-align:center;"><notempty name="v.end_date">{$v.start_date|date="Y-m-d",###}</notempty></td>
                            <td style="text-align:center;"><notempty name="v.end_date">{$v.end_date|date="Y-m-d",###}</notempty></td>
                            <td style="text-align:center;">保证期</td>
                            <td style="text-align:center;"><notempty name="v.owner.user_name"><a class="role_info" rel="{$v.owner.role_id}" href="javascript:void(0)">{$v.owner.user_name}</a></notempty></td>
                            <td class="dropdown">
                            <if condition="$content neq 'resource'">
                                <span class="dropdown-toggle" data-toggle="dropdown" style="cursor:pointer;color:#8FA1B2">
                                    <i class="fa fa-angle-down fa-lg"></i>
                                </span>
                                <ul class="dropdown-menu">
                                    <if condition="$business_id">
                                        <li><a rel="{:U('contacts/relToBusiness',array('business_id'=>$business_id,'contacts_id'=>$vo['contacts_id'],'act_n'=>2))}" href="javascript:void(0);" class="not_rel_contacts" >解除关联</a></li>
                                    </if>
                                    <li><a href="{:U('contacts/edit',array('id'=>$vo['contacts_id']))}">编辑</a></li>
                                    <if condition="$business_id eq ''">
                                        <if condition="$vo['contacts_id'] neq $mail_contacts_id">
                                            <li><a title="" href="{:U('contacts/changeToFirstContact', 'id='.$vo['contacts_id'].'&customer_id='.$customer_id)}">设为首要</a></li>
                                            <li><a title="删除联系人" href="javascript:void(0)" class="del_contacts" rel="{$vo['contacts_id']}" rel1="delete">删除</a></li>
                                            <else />
                                            <li><a title="删除联系人" href="javascript:void(0)" class="del_contacts" rel="{$vo['contacts_id']}" rel1="mdelete" rel2="{$customer_id}">删除</a></li>
                                        </if>
                                    </if>
                                </ul>
                            </if>
                            </td>

                            </tr>
                        </volist>
                        </tbody>
                    </table>
                    <else/>
                    <?php if($contract_info['contract_id']){ ?>
                    <div style="font-size:13px;font-weight:700;margin-top:15px;"><span style="border-left:5px solid #19AA8D;padding-left:10px;height:10px;"></span>基本信息</div>
                    <div class="form-horizontal view-group " style="background:#F2F4F7;margin-top:15px;padding:10px 10px 10px">
                        <div class="form-group">
                            <label class="col-lg-2 control-label">{:L('CONTRACT_NO')}</label>
                            <div class="col-lg-4">
                                <p class="form-p">
                                    <a href="{:U('contract/view','id='.$contract_info['contract_id'])}">
                                        {$contract_info.number}
                                    </a>
                                </p>
                            </div>
                            <label class="col-lg-2 control-label">{:L('SIGNING_TIME')}</label>
                            <div class="col-lg-4">
                                <div class="pull-left" style="margin-top:6px;color:#000;">{$contract_info.due_time|date="Y-m-d",###}</div>
                                <div class="pull-right social-action dropdown" style="margin-top:6px;">
                                    <span data-toggle="dropdown" class="dropdown-toggle">
                                        <i style="font-size:20px;cursor:pointer" class="fa fa-angle-down"></i>
                                    </span>
                                    <ul class="dropdown-menu m-t-xs" >
                                        <li><a href="{:U('contract/view','id='.$contract_info['contract_id'])}">详情</a></li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-2 control-label">签约{:L('CUSTOMER')}</label>
                            <div class="col-lg-4">
                                <p class="form-p">
                                    {$contract_info.customer_name}
                                </p>
                            </div>
                            <label class="col-lg-2 control-label">合同名称</label>
                            <div class="col-lg-4">
                                <p class="form-p">
                                    {$contract_info.contract_name}
                                </p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-2 control-label">合同签约人</label>
                            <div class="col-lg-4">
                                <p class="form-p">
                                    {$contract_info['owner_name']}
                                </p>
                            </div>
                            <label class="col-lg-2 control-label">合同金额</label>
                            <div class="col-lg-4">
                                <p class="form-p">
                                    {$contract_info.price}
                                </p>
                            </div>
                        </div>
                        <div style="display:none;" id="contract_content">
                            <div class="form-group">
                                <label class="col-lg-2 control-label">合同生效时间</label>
                                <div class="col-lg-4">
                                    <p class="form-p">
                                        {$contract_info['start_date']|date="Y-m-d",###}
                                    </p>
                                </div>
                                <label class="col-lg-2 control-label">合同到期时间</label>
                                <div class="col-lg-4">
                                    <p class="form-p">
                                        {$contract_info['end_date']|date="Y-m-d",###}
                                    </p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label">合同创建人</label>
                                <div class="col-lg-4">
                                    <p class="form-p">
                                        {$contract_info['creator_name']}
                                    </p>
                                </div>
                                <label class="col-lg-2 control-label">合同创建时间</label>
                                <div class="col-lg-4">
                                    <p class="form-p">
                                        {$contract_info.create_time|date="Y-m-d",###}
                                    </p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label">合同备注</label>
                                <div class="col-lg-10">
                                    <p class="form-p">
                                        {$contract_info.description}
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div style="font-size:13px;font-weight:700;margin-top:20px;">
                        <span style="border-left:5px solid #19AA8D;padding-left:10px;height:10px;"></span>审核信息
                    </div>
                    <div>
                        <div class="pull-left"><img src="{$contract_info['creator_info']['img']}" style="width:45px;height:45px;margin:10px 0 0 10px;border-radius:50px;"></div>
                        <div class="pull-left" style="margin:10px 0 0 10px;">
                            <div class="control-label" style="margin-top:2px;font-size:16px;color:#B4B1C2"><a class="role_info" rel="{$contract_info['creator_info']['role_id']}" href="javascript:void(0)">{$contract_info['creator_info']['full_name']}</a></div>
                            <div class="control-label" style="margin-top:2px;font-size:15px;">{$contract_info.create_time|date="Y-m-d H:i",###}</div>
                        </div>
                        <div class="pull-left" style="margin-left:6%;margin-top:25px;">
                            <span class="fa fa-circle" style="color:#B4B1C2"></span>
                            <span class="fa fa-circle" style="color:#B4B1C2"></span>
                            <span class="fa fa-circle" style="color:#B4B1C2"></span>
                        </div>
                        <div class="pull-left" style="margin-left:6%;">
                            <img <if condition = "$contract_info['examine']">src="{$contract_info['examine']['img']}"<else />src="__PUBLIC__/img/avatar_default.png"</if> style="width:45px;height:45px;margin:10px 0 0 10px;border-radius:50px;">
                        </div>
                        <div class="pull-left" style="margin:10px 0 0 10px;">
                            <div class="control-label" style="margin-top:2px;font-size:16px;color:#B4B1C2">
                                <if condition="$contract_info['is_checked'] neq 0">
                                    <a class="role_info" rel="{$contract_info['examine']['role_id']}" href="javascript:void(0)">{$contract_info['examine']['full_name']}</a>
                                    <else/>
                                    合同审核员
                                </if>
                            </div>
                            <div class="control-label" style="margin-top:2px;font-size:15px;">
                                <if condition="$contract_info['is_checked'] eq 1">
                                    <span style="color:#19AA8D">通过</span>
                                    <elseif condition="$contract_info['is_checked'] eq 2"/>
                                    <span style="color:#F5715F">拒绝</span>
                                    <else />
                                    <span style="color:#F5CA00">待审</span>
                                </if>
                            </div>
                        </div>
                        <div style="clear:both"></div>
                    </div>
                    <?php }else{ ?>
                    <?php if($is_business_code == 1 && empty($is_find)){ ?>
                    <div class="pull-right" style="padding-bottom: 15px">
                        <a class="btn btn-primary btn-sm" href="{:U('contract/add','business_id='.$c_business_id)}">添加合同</a>
                    </div>
                    <include file="Public:nodata" />
                    <?php } ?>
                    <?php } ?>
                </if>
            </div>
        </div>
    </div>
    <div id="tab6" class="tab-pane fade in">
        <div class="panel-body">
            <div class="ibox">
                <!--<div class="pull-left" style="padding-bottom: 15px">-->
                <!--<if condition="$business_id eq ''">-->
                <!--<if condition = "$invoice_info eq ''">-->
                <!--<a class="btn btn-primary btn-sm" id="add_invoice" href="javascript:void(0);">添加发票</a>-->
                <!--<else />-->
                <!--<a class="btn btn-primary btn-sm" id="view_invoice" rel="{$invoice_info['id']}" href="javascript:void(0);">查看发票</a>-->
                <!--</if>-->
                <!--</if>-->
                <!--</div>-->

                <table class="table select-table">
                    <thead>
                        <tr>
                            <td style="text-align:center;color:#999;">发票编号</td>
                            <td style="text-align:center;color:#999;">发票抬头</td>
                            <td style="text-align:center;color:#999;">项目名称</td>
                            <td style="text-align:center;color:#999;">候选人</td>
                            <td style="text-align:center;color:#999;">审批状态</td>
                            <td style="text-align:center;color:#999;">费用类型</td>
                            <td style="text-align:center;color:#999;">发票类型</td>
                            <td style="text-align:center;color:#999;">收款时间</td>
                            <td style="text-align:center;color:#999;">收款金额</td>
                            <td style="text-align:center;color:#999;">创建者</td>

                        </tr>
                    </thead>
                    <tbody class="body_border">
                    <if condition="$invoice">
                        <volist name="invoice" id="vo">
                            <tr>
                                <td style="text-align:center;">{$vo.name}</td>
                                <td style="text-align:center;">{$vo.invoice_header}</td>
                                <td style="text-align:center;">{$vo.business_name}</td>
                                <td style="text-align:center;">{$vo.resume_name}</td>
                                <td style="text-align:center;">
                            <if condition = "$vo[type] eq 'refuse'">
                                <p style="color:red">{$type_name[$vo[type]]}</p><input type="button" value="重新编辑提交" class="btn btn-default fapiao" data-id="{$vo['invoice_id']}">
                                <else />
                                <p style="color:green">{$type_name[$vo[type]]}</p>
                            </if>
                            </td>
                            <td style="text-align:center;">{$vo.cost_type}</td>
                            <td style="text-align:center;">{$vo.billing_type}</td>
                            <td style="text-align:center;">{$vo['create_time']|date="Y-m-d",###}</td>
                            <td style="text-align:center;">{$vo['money']}元</td>
                            <td style="text-align:center;"><notempty name="vo.user_name"><a class="role_info" rel="{$vo.create_role_id}" href="javascript:void(0)">{$vo.user_name}</a></notempty></td>
                            </tr>
                        </volist>
                        <else/>
                        <tr style="background-color:#fff;">
                            <td colspan="10">
                        <include file="Public:nodata" />
                        </td>
                        </tr>
                    </if>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <div class="tab-pane fade in" id="tab7">
        <div class="panel-body">
            <div class="">
                <a href="javascript:void(0);" type="button" class="add_file btn btn-primary" rel="<php>if (empty($business_id)){echo 'customer';}else{echo 'business';} </php>"><i class="fa fa-upload"></i>&nbsp;&nbsp;上传</a>
            </div>
            <div style="clear:both;"></div>
        </div>

        <if condition="$info.file eq null">
            <include file="Public:nodata" />
            <else />
            <table class="table product-table">
                <tr>
                    <td>附件名称</td>
                    <td>{:L('SIZE')}</td>
                    <td>上传人</td>
                    <td>上传时间</td><td>操作</td>
                </tr>
                <volist name="info.file" id="vo">
                    <tr>
                        <td>
                            <img src="__PUBLIC__/productImg/{$vo['pic']}" alt="">&nbsp;&nbsp;&nbsp;
                            <a <if condition="in_array(getExtension($vo['name']),imgFormat())">class="litebox_file" href="{$vo['file_path']}" data-litebox-group="group-{$info['contract_id']}" title="点击查看大图"<else/>href="javascript:;" file="{$vo.file_path}" filename="{$vo.name}" onclick="filedown(this);"</if>>{$vo.name}</a>
                        </td>
                        <td>
                            {$vo.size}KB
                        </td>
                    <if condition="C('ismobile') neq 1">
                        <td>
                        <notempty name="vo.owner.user_name">{$vo.owner.user_name}</notempty>
                        </td>
                        <td>
                        <notempty name="vo.create_date">{$vo.create_date|date="Y-m-d H:i",###}</notempty>
                        </td>
                        <td class="tdleft">
                            <a href="javascript:void(0);" rel="{$vo['file_id']}" class="del_file">{:L('DELETE')}</a>
                            <a href="javascript:;" file="{$vo.file_path}" filename="{$vo.name}" onclick="filedown(this);">下载</a>
                        </td>
                    </if>
                    </tr>
                </volist>

            </table>
        </if>
    </div>
    <div class="tab-pane fade in" id="tab8">
        <div id="tab-3" class="tab-pane">
            <div id="vertical-timeline" class="vertical-container light-timeline" style="width:100%;">
                <volist name="group_list" id="vo1">
                    <div class="col-sm-12">
                        <div class="pull-left">
                            <span style="line-height:32px;margin-right: 10px;">
                                <small>{$vo1['create_date']}&nbsp;{$vo1['week_name']}</small>
                            </span>
                        </div>
                        <div class="pull-left">
                            <volist name="vo1['action_list']" id="vo">
                                <div class="vertical-timeline-block" style="margin:0px;border-left:1px solid #ccc;margin-left:20px;">
                                    <i class="fa fa-circle pull-left" style="margin-left:-6px;color:#CAD7EF;margin-top:9px;font-size:12px;"></i>
                                    <div class="vertical-timeline-content" style="padding-top: 0px;margin-left:20px;">
                                        <div class="pull-left">
                                            <span class="pull-left" style="line-height:32px;margin-right: 10px;">
                                                <small>{$vo['create_time']|date='H:i',###}</small>
                                            </span>
                                            <a class="role_info pull-left" rel="{$vo['create_role_info']['role_id']}" href="javascript:void(0)" style="margin-right:5px;">
                                                <img alt="image" class="img-circle" style="width:32px;height:32px;" <if condition = "$vo['create_role_info']['thumb_path']" >src="{$vo['create_role_info']['thumb_path']}"<else />src="__PUBLIC__/img/avatar_default.png"</if>>
                                            </a>
                                            <span class="pull-left" style="line-height:32px;">
                                                <div class="pull-left">{$vo['create_role_info']['full_name']}&nbsp;&nbsp;</div>
                                                <div class="pull-left">{$vo['duixiang']}</div>
                                                <div style="clear:both;"></div>
                                            </span>
                                            <volist name="vo['role_list']" id="vo1">
                                                <a class="role_info" rel="{$vo1['role_id']}" href="javascript:void(0)" style="margin-right:5px;">
                                                    <img alt="image" class="img-circle" style="width:32px;height:32px;" <if condition = "$vo1['thumb_path']">src="{$vo1['thumb_path']}"<else />src="__PUBLIC__/img/avatar_default.png"</if>>
                                                </a>
                                                <span style="line-height:32px;">{$vo1['full_name']}</span>
                                            </volist>
                                        </div>
                                    </div>
                                </div>
                            </volist>
                        </div>
                    </div>
                </volist>
            </div>
        </div>
    </div>
</div>
<div style="display:none" id="dialog-role-info" title="{:L('EMPLOYEE_INFORMATION')}">
    <div class="spiner-example">
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
    </div>
</div>
<div style="display:none" id="dialog-contacts" title="关联联系人">
    <div class="spiner-example">
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
    </div>
</div>
<div class="" style="display:none;" id="dialog-file" title="{:L('ADD_ATTACHMENT')}">
    <div class="spiner-example">
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
    </div>
</div>
<div style="display:none" id="dialog-setting_reply" title="管理快捷沟通">
    <div class="spiner-example">
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
    </div>
</div>
<div style="display:none" id="dialog-fapiao">
    <div class="spiner-example">
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
    </div>
</div>

<div class="modal inmodal fade" id="addInvoice" aria-hidden="true" aria-labelledby="addInvoice" role="dialog" tabindex="-1" style="overflow:auto; border:1px solid #000000;">
    <div class="modal-dialog modal-md" style="width:700px;">
        <div class="modal-content" id="add_invoice_dialog">

        </div>
    </div>
</div>
<div class="modal inmodal fade" id="editInvoice" aria-hidden="true" aria-labelledby="editInvoice" role="dialog" style="overflow:auto; border:1px solid #000000;">
    <div class="modal-dialog modal-md" style="width:700px;">
        <div class="modal-content" id="edit_invoice_dialog">

        </div>
    </div>
</div>

<div class="modal inmodal fade" id="viewInvoice" aria-hidden="true" aria-labelledby="viewInvoice" role="dialog" tabindex="-1" style="overflow:auto; border:1px solid #000000;">
    <div class="modal-dialog modal-md" style="width:700px;">
        <div class="modal-content form-horizontal" id="view_invoice_dialog">

        </div>
    </div>
</div>


<include file="Public:mapbaidu" />
<link href="__PUBLIC__/css/litebox.css" rel="stylesheet" type="text/css">
<script src="__PUBLIC__/js/litebox.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/images-loaded.min.js" type="text/javascript"></script>
<script>


                                /*任务详情 加载的圈圈效果*/
                                var detail_html = '<div class="spiner-example">\
                                        <div class="sk-spinner sk-spinner-fading-circle">\
                                                <div class="sk-circle1 sk-circle"></div>\
                                                <div class="sk-circle2 sk-circle"></div>\
                                                <div class="sk-circle3 sk-circle"></div>\
                                                <div class="sk-circle4 sk-circle"></div>\
                                                <div class="sk-circle5 sk-circle"></div>\
                                                <div class="sk-circle6 sk-circle"></div>\
                                                <div class="sk-circle7 sk-circle"></div>\
                                                <div class="sk-circle8 sk-circle"></div>\
                                                <div class="sk-circle9 sk-circle"></div>\
                                                <div class="sk-circle10 sk-circle"></div>\
                                                <div class="sk-circle11 sk-circle"></div>\
                                                <div class="sk-circle12 sk-circle"></div>\
                                        </div>\
                                </div>';
                                //快捷沟通
                                $(".select2").select2();

                                $("#dialog-setting_reply").dialog({
                                    autoOpen: false,
                                    // modal: true,
                                    width: 550,
                                    maxHeight: 450,
                                    position: ["center", 100],
                                    close: function () {
                                        selectStatus();//更新
                                        $(this).html("");
                                    },
                                    buttons: {
                                        "确定": function () {
                                            $('#status_form1').submit();
                                            $(this).dialog("close");
                                        },
                                        "取消": function () {
                                            selectStatus();//更新
                                            $(this).dialog("close");
                                        }
                                    }
                                });

                                $(function () {
                                    $("#setting_reply_dialog").click(function () {
                                        $('#dialog-setting_reply').dialog('open');
                                        $('#dialog-setting_reply').load('{:U("setting/replyList")}');
                                    });
                                })

                                function selectStatus() {
                                    var status_id = $("#status_id option:selected").val();
                                    var temp = '<option value="">--请选择--</option>';
                                    $.ajax({
                                        type: 'post',
                                        url: "{:U('setting/getReplyByStatus')}",
                                        data: {status_id: status_id},
                                        async: false,
                                        success: function (data) {
                                            $.each(data.data, function (k, v) {
                                                temp += '<option value="' + v.content + '">' + v.str_content + '</option>';
                                            });
                                        },
                                        dataType: 'json'
                                    });
                                    $('#replay_list').html(temp);
                                }

                                function selectReply() {
                                    var replay_content = $("#replay_list option:selected").val();
                                    var status_id = $("#replay_list option:selected").attr('rel');
                                    //修改跟进类型
                                    $("#status_id option[value=" + status_id + "]").attr('selected', true);
                                    //判断是否替换
                                    var log_content = $('#log-text').val();
                                    if (log_content !== '') {
                                        swal({
                                            title: '',
                                            text: '已填写沟通日志内容，确定要替换吗？',
                                            type: "warning",
                                            showCancelButton: true,
                                            confirmButtonColor: "#DD6B55",
                                            confirmButtonText: "确认",
                                            cancelButtonText: "取消",
                                            closeOnConfirm: true,
                                            closeOnCancel: true}, function (isConfirm) {
                                            if (isConfirm) {
                                                $('#log-text').val(replay_content);
                                            } else {
                                                return false;
                                            }
                                        });
                                    } else {
                                        $('#log-text').val(replay_content);
                                    }
                                }

                                $('#log-list').on('click', '.map', function () {
                                    $(this).next('.allmap').slideToggle('show');
                                    var a = $(this).siblings('.longitude').attr('rel');
                                    var b = $(this).siblings('.latitude').attr('rel');
                                    var vals = $(this).next('.allmap').attr('rel');
                                    var url = "{:U('index/gettranslocation')}" + "&longtitude=" + a + "&latitude=" + b;
                                    $.get(url, function (data) {
                                        var x = data.data.x;
                                        var y = data.data.y;
                                        setTimeout("mapInit(" + y + "," + x + "," + vals + ")", 1000);
                                    })
                                });

                                function mapInit(x, y, mapID) {
                                    var map = new BMap.Map(mapID);
                                    var point = new BMap.Point(y, x);
                                    map.centerAndZoom(point, 15);
                                    var marker = new BMap.Marker(point);  // 创建标注
                                    map.addOverlay(marker);               // 将标注添加到地图中
                                    map.enableScrollWheelZoom(true);
                                }
                                ;
                                /**
                                 * 页面加载时执行Tab start
                                 */
                                $(function () {
                                    var thisId = window.location.hash;
                                    var atype = thisId.substr(1);
                                    // $('#left_list a[type="'+atype+'"]').trigger('click');
                                    $('#left_list a[type="' + atype + '"]').tab('show');
                                    $('.houxuanren a[type="' + atype + '"]').tab('show');
                                });
                                /**
                                 * 页面加载时执行Tab end
                                 */
                                $('#left_list a').click(function (e) {
                                    // $(this).tab('show');
                                    var maodian = '#' + $(this).attr('type');
                                    url_jump(maodian);
                                    var bid = $('#bid').val();
                                    if (bid == '') {
                                        $('#customer-relation').removeClass('all_business');
                                        $('#customer-relation').addClass('all_business_a');
                                    }
                                });

                                function url_jump(maodian) {
                                    $('#maodian').val(maodian);
                                    var customer_id = "{$customer_id}";
                                    var module_business_id = $('#module_business_id').val();
                                    var bid = $('#bid').val();
                                    if (module_business_id) {
                                        var url = "{:U('business/view','id=')}" + module_business_id + maodian;
                                    } else {
                                        if (bid) {
                                            var url = "{:U('customer/view','id=')}" + customer_id + '&bid=' + bid + maodian;
                                        } else {
                                            var url = "{:U('customer/view','id=')}" + customer_id + maodian;
                                        }
                                    }
                                    window.history.replaceState({}, 0, window.location.protocol + "//" + window.location.host + url);
                                }
                                var business_id = "{$business_id}";

                                /**
                                 * 附件 如果是图片时 双击可查看大图
                                 */
                                $('.litebox_file').liteBox({
                                      revealSpeed: 400,
                                      background: 'rgba(0,0,0,.8)',
                                      overlayClose: true,
                                      escKey: true,
                                      navKey: true,
                                      errorMessage: '图片加载失败.'
                                });
                                $("#dialog-file").dialog({
                                    autoOpen: false,
                                    modal: true,
                                    width: 800,
                                    maxHeight: 400,
                                    position: ["center", 100],
                                    buttons: {
                                        "确定": function () {
                                            location.reload();
                                        },
                                        "取消": function () {
                                            $(this).html('');//清空缓存
                                            $(this).dialog("close");
                                        }
                                    }
                                });

                                $(".add_file").click(function () {
                                    $('#dialog-file').dialog('open');
                                    $('#dialog-file').load('{:U("file/add","r=RBusinessFile&module=business&id=".$business_id)}');
                                });


                                $(".role_info").click(function () {
                                    $role_id = $(this).attr('rel');
                                    $('#dialog-role-info').dialog('open');
                                    $('#dialog-role-info').load('{:U("user/dialoginfo","id=")}' + $role_id);
                                });

                                $("#dialog-role-info").dialog({
                                    autoOpen: false,
                                    modal: true,
                                    width: 600,
                                    maxHeight: 550,
                                    position: ["center", 100]
                                });

                                $('.business_code').on('click', function () {
                                    var is_checked = $(this).attr('rel');
                                    if (is_checked == 1) {
                                        $(this).attr('rel', '');
                                        $(this).prop('checked', false);
                                    } else {
                                        $('.business_code').attr('rel', '');
                                        $(this).attr('rel', 1);
                                    }
                                });
                                /*单选框取消选择*/
                                $('#product-radio ins').on('click', function () {
                                    var checked = $(this).parent().hasClass('hahha');

                                    if (!checked) {
                                        $(this).parent().addClass('checked');
                                        $(this).parent().addClass('hahha');
                                        $(this).prev().prop('checked', true);
                                    } else {
                                        $(this).parent().removeClass('checked');
                                        $(this).parent().removeClass('hahha');
                                        $(this).prev().prop('checked', false);
                                    }
                                });
                                /*关联联系人*/
                                $("#dialog-contacts").dialog({
                                    autoOpen: false,
                                    modal: true,
                                    minWidth: 850,
                                    maxHeight: 600,
                                    position: ["center", 100],
                                    buttons: {
                                        "确定": function () {
                                            var _this = this;
                                            var contacts_ids = new Array();
                                            $('.contacts_ch:checked').each(function (k, v) {
                                                contacts_ids.push($(v).val());
                                            }).val();
                                            if (contacts_ids.length == 0) {
                                                alert_crm('请至少选择一个联系人！');
                                            } else {
                                                $.get("{:U('contacts/relToBusiness')}&act_n=1&contacts_id=" + contacts_ids + "&business_id=" + business_id, {}, function (ret) {
                                                    if (ret[0] == 'success') {
                                                        var temp_business_id = business_id;
                                                        $('.product-content').html(detail_html);
                                                        product_detail($('.product-list[rel=' + temp_business_id + ']').find('.product-a'), "a[href='#tab-3']");
                                                        $(_this).dialog("close");
                                                    } else {
                                                        alert_crm(ret[1]);
                                                    }
                                                })

                                            }
                                        },
                                        "取消": function () {
                                            $(this).html('');
                                            $(this).dialog("close");
                                        }
                                    },
                                    close: function () {
                                        $(this).empty();
                                    }
                                });

                                $("#rel_contacts").click(function () {
                                    $('#dialog-contacts').html('');
                                    // var customer_id = $(this).attr('rel');
                                    // var business_id = $(this).attr('rel1');
                                    $('#dialog-contacts').load('{:U("contacts/checklistdialog",array("id"=>$customer_id,"business_id"=>$business_id))}');
                                    $('#dialog-contacts').dialog('open');
                                });
                                //解绑联系人
                                $(".not_rel_contacts").click(function () {
                                    var _this = this;
                                    swal({
                                        title: '确定要解除绑定吗？',
                                        type: "warning",
                                        showCancelButton: true,
                                        confirmButtonColor: "#DD6B55",
                                        confirmButtonText: "确认",
                                        cancelButtonText: "取消",
                                        closeOnConfirm: true,
                                        closeOnCancel: true}, function (isConfirm) {
                                        if (isConfirm) {
                                            $.get($(_this).attr('rel'), {}, function (ret) {
                                                if (ret[0] == 'success') {
                                                    var temp_business_id = business_id;
                                                    $('.product-content').html(detail_html);
                                                    product_detail($('.product-list[rel=' + temp_business_id + ']').find('.product-a'), "a[href='#tab-3']");
                                                } else {
                                                    alert_crm(ret[1]);
                                                }
                                            })
                                        } else {
                                            return false;
                                        }
                                    });
                                })
                                /*跟进记录*/
                                function btnHide() {
                                    $('#log-text').attr('rows', 1);
                                    $('#log-btn').hide();
                                    $('#business_table').hide();
                                    $('#log-text').val('');
                                }
                                $('#log-text').focus(function () {
                                    $(this).attr('rows', 4);
                                    $('#log-btn').show();
                                    $('#business_table').show();
                                    $('#add_log').prop('disabled', false);
                                });
                                $('#log-text').focusout(function () {
                                    var code_id = $("input[name='id']:checked").val();
                                    if ($(this).val() == '' && code_id == '') {
                                        btnHide();
                                    }
                                });
                                $('#quxiao').click(function () {
                                    btnHide();
                                    return false;
                                });
                                /*ajax 提交记录*/

                                $('#add_log').click(function () {
                                    var log_content = $.trim($('#log-text').val());
                                    if (log_content == '') {
                                        alert_crm('沟通日志内容不能为空！');
                                        return false;
                                    }
                                    //跟进类型
                                    // var status_id = $('#status_id option:selected').val();
                                    // if (status_id == '') {
                                    //     alert_crm('跟进类型不能为空！');
                                    //     $('#add_log').prop('disabled',false);
                                    // }

                                    var radio_id = $('#product-radio input:radio:checked').val();
                                    var code = $('#product-radio input:radio:checked').attr('code');
                                    var html_code = "<div class='log-relation'><i class='fa fa-bookmark'></i>&nbsp;<span>相关商机:" + code + "</span></div>";
                                    //console.log(radio_id);
                                    var log_type = 'rBusinessLog';

                                    var status_name = '';
                                    if ($('#status_id option:selected').text() !== '--请选择--') {
                                        status_name = $('#status_id option:selected').text();
                                    }
                                    var nextstep_time_log = '';
                                    if ($('#nextstep_time_log').val() !== '') {
                                        nextstep_time_log = $('#nextstep_time_log').val();
                                    }

                                    if (radio_id == null || radio_id == 0) {
                                        var html_code = '';
                                        $("#business_id").val(business_id);

                                        if (business_id == null || business_id == 0) {
                                            $("[name='r']").val('RCustomerLog');
                                            $("[name='module']").val('customer');
                                            $("#business_id").val("{$customer_id}");
                                            log_type = 'rCustomerLog';
                                        }
                                    }

                                    $(this).prop('disabled', true);
                                    $.post("{:U('Log/add')}", $("#add-form").serialize(), function (data) {
                                        if (data.status == 1) {
                                            var content = $('#log-text').val().replace('&nbsp', '&NBSP');
                                            var log_html = "<div class='ibox-content gray-bg' log-rel='" + data.data.log_id + "' style='margin-bottom: 18px'><div class='social-feed-separated clearfix'><div class='social-feed-box'><div class='pull-right social-action dropdown'><span data-toggle='dropdown' class='dropdown-toggle'><i style='font-size:20px;cursor:pointer' class='fa fa-angle-down'></i></span><ul class='dropdown-menu m-t-xs' ><li><a  rel='" + data.data.log_id + "' href='javascript:void(0);' type='" + log_type + "' onclick='del_confirm(this);'>{:L('DELETE')}</a></li></ul></div><div class='social-avatar'><img alt='image' style='width:35px;height:35px;' class='img-circle' src='" + data.data.owner.thumb_path + "'><a class='role_info name-colors'  rel='" + data.data.owner.role_id + "' href='javascript:void(0)'>" + data.data.owner.full_name + "</a>&nbsp;&nbsp;<span class='text-muted'>添加了一条快速记录</span>&nbsp;&nbsp;<span class='text-muted' >" + data.data.date + "&nbsp;&nbsp;<a title='沟通类型' href='javascript:void(0);'>" + status_name + "</a></span></div><div class='social-body'><span style='word-wrap:break-word;line-height: 21px;color: #000;'>" + content + "</span>" + html_code + "</div>";
                                            if (nextstep_time_log !== '1970-01-01 08:00') {
                                                log_html += "<div class='social-avatar' style='padding-top:10px;''><span class='text-muted pull-right'>下次联系时间：" + nextstep_time_log + "</span></div>";
                                            }
                                            log_html += "</div></div></div>";

                                            $('#log-list').prepend(log_html);
                                            btnHide();
                                        } else {
                                            alert_crm('添加失败, 请重试');
                                        }
                                        $("[name='r']").val('rBusinessLog');
                                        $("[name='module']").val('business');
                                        $("#business_id").val(business_id);
                                    });
                                });
                                /*删除日志*/
                                function del_confirm(e) {
                                    swal({
                                        title: "确定要删除沟通日志吗？",
                                        text: "删除后将无法恢复，请谨慎操作！",
                                        type: "warning",
                                        showCancelButton: true,
                                        confirmButtonColor: "#DD6B55",
                                        confirmButtonText: "是的，我要删除！",
                                        cancelButtonText: '让我再考虑一下…',
                                        closeOnConfirm: false,
                                        closeOnCancel: false
                                    },
                                            function (isConfirm) {
                                                if (isConfirm) {
                                                    var log_id = $(e).attr('rel');
                                                    var type = $(e).attr('type');
                                                    $.get("{:U('log/delete')}", {r: type, id: log_id}, function (data) {
                                                        if (data != 0) {
                                                            swal({
                                                                title: "删除成功！",
                                                                text: "",
                                                                type: "success"
                                                            });
                                                            $("[log-rel='" + log_id + "']").remove();
                                                        } else {
                                                            swal({
                                                                title: "操作失败！",
                                                                text: data.info,
                                                                type: "error"
                                                            })
                                                            return false;
                                                        }
                                                    });
                                                } else {
                                                    swal("已取消", "您取消了删除操作！", "error");
                                                }
                                            });
                                }
                                ;
                                //删除联系人
                                $('.del_contacts').click(function () {
                                    var contacts_id = $(this).attr('rel');
                                    var type = $(this).attr('rel1');
                                    var customer_id = $(this).attr('rel2');
                                    swal({
                                        title: "您确定要删除联系人吗？",
                                        text: "删除后将无法恢复，请谨慎操作！",
                                        type: "warning",
                                        showCancelButton: true,
                                        confirmButtonColor: "#DD6B55",
                                        confirmButtonText: "是的，我要删除！",
                                        cancelButtonText: '让我再考虑一下…',
                                        closeOnConfirm: false,
                                        closeOnCancel: false
                                    },
                                            function (isConfirm) {
                                                if (isConfirm) {
                                                    if (type == 'mdelete') {
                                                        //删除首要联系人
                                                        $.ajax({
                                                            type: 'get',
                                                            url: "{:U('contacts/mdelete','r=rContactsCustomer&module_id=')}" + customer_id + '&id=' + contacts_id,
                                                            async: false,
                                                            success: function (data) {
                                                                if (data.status == 1) {
                                                                    swal("删除成功！", "您已经永久删除了信息！", "success");
                                                                    location.reload();
                                                                } else {
                                                                    swal({
                                                                        title: "操作失败！",
                                                                        text: data.info,
                                                                        type: "error"
                                                                    })
                                                                    return false;
                                                                }
                                                            },
                                                            dataType: 'json'
                                                        });
                                                    } else {
                                                        $.ajax({
                                                            type: 'get',
                                                            url: "{:U('contacts/delete','id=')}" + contacts_id,
                                                            async: false,
                                                            success: function (data) {
                                                                if (data.status == 1) {
                                                                    swal("删除成功！", "您已经永久删除了信息！", "success");
                                                                    location.reload();
                                                                } else {
                                                                    swal({
                                                                        title: "操作失败！",
                                                                        text: data.info,
                                                                        type: "error"
                                                                    })
                                                                    return false;
                                                                }
                                                            },
                                                            dataType: 'json'
                                                        });
                                                    }
                                                } else {
                                                    swal("已取消", "您取消了删除操作！", "error");
                                                }
                                            });
                                });
                                //删除附件
                                $('.file_delete').click(function () {
                                    var file_id = $(this).attr('rel');
                                    swal({
                                        title: "您确定要删除附件信息吗？",
                                        text: "删除后将无法恢复，请谨慎操作！",
                                        type: "warning",
                                        showCancelButton: true,
                                        confirmButtonColor: "#DD6B55",
                                        confirmButtonText: "是的，我要删除！",
                                        cancelButtonText: '让我再考虑一下…',
                                        closeOnConfirm: false,
                                        closeOnCancel: false
                                    },
                                            function (isConfirm) {
                                                if (isConfirm) {
                                                    $.ajax({
                                                        type: 'get',
                                                        url: "{:U('file/delete','r=RCustomerFile&id=')}" + file_id,
                                                        async: false,
                                                        success: function (data) {
                                                            if (data.status == 1) {
                                                                swal("删除成功！", "您已经永久删除了信息！", "success");
                                                                location.reload();
                                                            } else {
                                                                swal({
                                                                    title: "操作失败！",
                                                                    text: data.info,
                                                                    type: "error"
                                                                })
                                                                return false;
                                                            }
                                                        },
                                                        dataType: 'json'
                                                    });
                                                } else {
                                                    swal("已取消", "您取消了删除操作！", "error");
                                                }
                                            });
                                });

                                $(".editproduct_view").click(function () {
                                    var business_id = $(this).attr('rel');
                                    var customer_id = "{$customer['customer_id']}";
                                    $('#dialog-editproduct').dialog('open');
                                    $('#dialog-editproduct').load('{:U("product/mutildialog_product","business_id=")}' + business_id);
                                });

                                //发票
                                $('#add_invoice').click(function () {
                                    var customer_id = "{$customer_id}";
                                    $('#addInvoice').modal('show');
                                    var url = "{:U('invoice/addData','customer_id=')}" + customer_id;
                                    $('#add_invoice_dialog').load(url);
                                });
                                $('#view_invoice').click(function () {
                                    var invoice_id = $(this).attr('rel');
                                    $('#viewInvoice').modal('show');
                                    var url = "{:U('invoice/viewData','invoice_id=')}" + invoice_id;
                                    $('#view_invoice_dialog').load(url);
                                });


                                $("input[name='checkall']").click(function () {

                                    var st = $(this).closest(".tab-content").attr("id");
                                    $("#" + st + " input[name='checklist']").prop('checked', $(this).prop("checked"));
                                    var i = 0;
                                    var id_array = new Array();
                                    $("#" + st + " input[name='checklist']").each(function () {
                                        if ($(this).prop("checked")) {
                                            i++;
                                            id_array.push($(this).val());
                                        }
                                    })
                                    if (i > 0) {
                                        $("#" + st + " .title-bar").show();
                                        $("#" + st + " .icheck_num").html(i);
                                        $("#" + st + " .select_arr").val(id_array);
                                    } else {
                                        $("#" + st + " .title-bar").hide();
                                    }
                                })

                                $("input[name='checklist']").click(function () {
                                    var st = $(this).closest(".tab-content").attr("id");
                                    var i = 0;
                                    var id_array = new Array();
                                    $("#" + st + " input[name='checklist']").each(function () {
                                        if ($(this).prop("checked")) {
                                            i++;
                                            id_array.push($(this).val());
                                        }
                                    })

                                    if (i > 0) {
                                        $("#" + st + " .title-bar").show();
                                        $("#" + st + " .icheck_num").html(i);
                                        $("#" + st + " .select_arr").val(id_array);
                                    } else {
                                        $("#" + st + " .title-bar").hide();
                                    }

                                })

                                $(".back-show").click(function () {
                                    $(".title-bar").hide();
                                    $("input[name='checklist']").prop('checked', false);
                                    $("input[name='checkall']").prop('checked', false);
                                })


</script>


<script type="text/javascript">

    //鼠标点击空白处，隐藏右侧滑出
    //    document.onmousedown=function(event){
    //        if(event.target.className == 'right-sidebar-toggle-log') return;
    //
    //        var div = document.getElementById("right-sidebar-log");
    //        var x=event.clientX;
    //        var y=event.clientY;
    //        var divx1 = div.offsetLeft;
    //        var divy1 = div.offsetTop;
    //        var divx2 = div.offsetLeft + div.offsetWidth;
    //        var divy2 = div.offsetTop + div.offsetHeight;
    //        if( x < divx1 || x > divx2 || y < divy1 || y > divy2){
    //            if($("#right-sidebar-log").css('right') == '0px'){
    //                $("#right-sidebar-log").animate({right:'-60%'}, 400);
    //            }
    //        }
    //    }

    $(document).on("click", ".closeslide", function () {
        if ($("#right-sidebar-log").css('right') == '0px') {
            $("#right-sidebar-log").animate({right: '-60%'}, 600);
        }
    })

    //日志详情弹出
    var timer;
    $(document).on('click', '.slidebar-nav', function () {

        var customer_id = $(this).attr('data-id');
        $(".emoji_container").remove();
        if ($("#right-sidebar-log").css('right') != '0px') {
            $("#right-sidebar-log").animate({right: '0px'}, 600);
        }
        $('#task-content').html(detail_html);
        $('#sidebar-container').load("/index.php?m=business&a=listajax&id=" + customer_id);

        //        clearTimeout(timer);
        //        timer=setTimeout(function () {
        //
        //            if($("#right-sidebar-log").css('right') != '0px'){
        //                $("#right-sidebar-log").animate({right:'0px'}, 600);
        //            }
        //            $('#sidebar-container').load("/index.php?m=business&a=listajax&id="+customer_id);
        //        },1000);
    });

    $(document).on('click', '.upresumes', function () {
        var dataid = $(this).attr('data-id');//读取简历ID
        swal({
            title: '确认推荐此简历?',
            type: "warning",
            showCancelButton: true,
            confirmButtonColor: "#DD6B55",
            confirmButtonText: "确定",
            closeOnConfirm: false
        },
                function () {
                    $.ajax({
                        type: "post",
                        url: "{:U('Business/upResume')}",
                        data: {
                            calllistid: dataid
                        },
                        success: function (data) {
                            if (data.code == 200) {
                                swal("推荐成功！", "您推荐此简历！", "success");
                                location.reload();
                            } else {
                                swal({
                                    title: "操作失败！",
                                    text: data.info,
                                    type: "error"
                                })
                                return false;
                            }
                        },
                        error: function () {

                        }
                    })
                });
    });

    $(".right-sidebar-toggle-log").on("mouseleave", function () {
        clearTimeout(timer);
    })

    $(".add_customer").click(function () {
        var rel = $(this).attr("rel");
        //获取选中的候选人
        var select_ids = $(this).closest(".title-bar").find(".select_arr").val();
        var title = "";
        var status = 0;
        if (rel == "addcc") {
            title = "确定加入CallList吗?";
            status = 1;
        }
        if (rel == "removecc") {
            title = "将候选人从CallList移除";
            status = 2;
        }
        if (rel == "tjgw") {
            title = "确定推荐给顾问面试?";
            status = 3;
        }
        if (rel == "tjkehu") {
            title = "确定推荐人才给客户?";
            status = 4;
        }
        if (rel == "buheshi") {
            title = "确定设置候选人为不合适?";
            status = 5;
        }
        swal({
            title: title,
            type: "warning",
            showCancelButton: true,
            confirmButtonColor: "#DD6B55",
            confirmButtonText: "确定",
            closeOnConfirm: false
        },
                function () {
                    $.ajax({
                        type: "post",
                        url: "",
                        data: {
                            select_ids: select_ids,
                            status: status
                        },
                        success: function () {
                            window.href = href;
                        },
                        error: function () {

                        }
                    })
                });
    });

    $('.del_file').click(function () {
        var file_id = $(this).attr('rel');
        swal({
            title: "您确定要删除这个附件吗？",
            text: "删除后将无法恢复，请谨慎操作！",
            type: "warning",
            showCancelButton: true,
            confirmButtonColor: "#DD6B55",
            confirmButtonText: "是的，我要删除！",
            cancelButtonText: '让我再考虑一下…',
            closeOnConfirm: false,
            closeOnCancel: false
        },
                function (isConfirm) {
                    if (isConfirm) {
                        $.ajax({
                            type: 'get',
                            url: "{:U('file/delete','r=RBusinessFile&id=')}" + file_id,
                            async: false,
                            success: function (data) {
                                if (data.status == 1) {
                                    swal("删除成功！", "您已经永久删除了信息！", "success");
                                    location.reload();
                                } else {
                                    swal({
                                        title: "操作失败！",
                                        text: data.info,
                                        type: "error"
                                    })
                                    return false;
                                }
                            },
                            dataType: 'json'
                        });
                    } else {
                        swal("已取消", "您取消了删除操作！", "error");
                    }
                });
    });

</script>

<!--重新编辑发票提交 edit by yanghao 2019-02-23 -->
<script>
    //重新编辑发票提交
    $(".fapiao").on("click", function () {
        var id = $(this).attr("data-id");
        $('#dialog-fapiao').dialog("open");
        $('#dialog-fapiao').load("index.php?m=business&a=invoiceReCheck&id=" + id);
    })
    $("#dialog-fapiao").dialog({
        autoOpen: false,
        modal: true,
        width: 580,
        maxHeight: 580,
        position: ["center", 100],
        title: "发票",
        close: function () {
            //selectStatus();//更新
            $(this).html("");
        },
        buttons: {
            "确定": function () {
                var billing_type = $("select[name=billing_type] option:selected").text();
                var invoice_header = $("input[name=invoice_header]").val();
                var content = $("input[name=content]").val();
                var price = $("input[name=price]").val();
                var description=$("textarea[name=description]").val();
                if (billing_type == "") {
                    $("select[name=billing_type]").css("border", "1px dotted #cc5965");
                    return false;
                }
                if (invoice_header == "") {
                    $("input[name=invoice_header]").css("border", "1px dotted #cc5965");
                    return false;
                }
                if (content == "") {
                    $("input[name=content]").css("border", "1px dotted #cc5965");
                    return false;
                }
                if (price == "") {
                    $("input[name=price]").css("border", "1px dotted #cc5965");
                    return false;
                }
                if (description == "") {
                    $("textarea[name=description]").css("border", "1px dotted #cc5965");
                    return false;
                }
                $('#fapiao_form').submit();
                $(this).dialog("close");
            },
            "取消": function () {
                //selectStatus();//更新
                $(this).dialog("close");
            }
        }
    });
</script>

